This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Prelude | |
import Control.Monad.Eff.Console (log) | |
-- give a name to an extensible record with fields common to all ducks | |
type Duck a = { name :: String | |
, color :: String | a } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (Html, div, text) | |
-- give a name to an extensible record with fields common to all ducks | |
type alias Duck a = { a | name : String | |
, color : String } | |
-- operation common to all ducks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mg = require 'mongoose' | |
Global = new mg.Schema | |
progress: String | |
RecipeUpload = new mg.Schema | |
lang: type: String, index: yes | |
filename: type: String, index: yes | |
contents: Buffer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Color (..) | |
import Graphics.Collage (..) | |
import Graphics.Element (..) | |
import Time (fps, fpsWhen) | |
import Keyboard (isDown) | |
import Char (toCode) | |
import Signal (foldp,map2, (<~)) | |
import Text(asText) | |
import List (map, (::)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"python2 switch.py 1" | |
1 | |
"python2 switch.py 2" | |
2 | |
"python2 switch.py 3" | |
3 | |
"amixer set Master 5+" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Wire.h> | |
#include "WiiChuck.h" | |
#include <Adafruit_NeoPixel.h> | |
#define PIN 0 | |
//#define N 232 | |
#define N 62 | |
// Parameter 1 = number of pixels in strip | |
// Parameter 2 = pin number (most are valid) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Wire.h> | |
#include "WiiChuck.h" | |
#include <Adafruit_NeoPixel.h> | |
#define PIN 0 | |
//#define N 232 | |
#define N 62 | |
// Parameter 1 = number of pixels in strip | |
// Parameter 2 = pin number (most are valid) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Adafruit_NeoPixel.h> | |
#define PIN 0 | |
// Parameter 1 = number of pixels in strip | |
// Parameter 2 = pin number (most are valid) | |
// Parameter 3 = pixel type flags, add together as needed: | |
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) | |
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers) | |
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import prelude | |
Signal = -> new (class SignalClass | |
(register) -> | |
@handlers = [] | |
register @send | |
send: (value) ~> | |
@_value = value | |
for handler in @handlers => handler value |