This file contains 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
#define ETAPE A0 | |
float resistance; | |
void setup(void) { | |
Serial.begin(9600); | |
} | |
void loop(void) { | |
resistance = analogRead(ETAPE); |
This file contains 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
#define ETAPE A0 | |
// Set crucial level as appropriate for your needs. | |
// For me, 687 indicates three inches of water. | |
#define CRUCIAL_LEVEL 687 | |
#define LED_RED 13 | |
float resistance; | |
void setup(void) { |
This file contains 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
#define ETAPE A0 | |
// Set crucial level as appropriate for your needs. | |
// For me, 687 indicates three inches of water. | |
#define CRUCIAL_LEVEL 687 | |
#define LED_RED 13 | |
#define LED_GREEN 12 | |
float resistance; |
This file contains 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
if (typeof Typekit != 'undefined') { | |
try { | |
Typekit.load({ | |
active: function() { | |
// it worked. carry on ... | |
} | |
}); | |
} catch(e) { | |
// probably want to fall back to no typekit | |
$('html').addClass('wf-inactive').removeClass('wf-loading'); |
This file contains 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
/* http://meyerweb.com/eric/tools/css/reset/ | |
v2.0 | 20110126 | |
License: none (public domain) | |
*/ | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, |
This file contains 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
# Sudoku solver in CoffeeScript based on the Python solution by Peter Norvig | |
# http://norvig.com/sudoku.html | |
# 2011-04-19 jonelf@gmail.com | |
# | |
# Throughout this program we have: | |
# r is a row, e.g. 'A' | |
# c is a column, e.g. '3' | |
# s is a square, e.g. 'A3' | |
# d is a digit, e.g. '9' | |
# u is a unit, e.g. ['A1','B1','C1','D1','E1','F1','G1','H1','I1'] |
This file contains 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
/* Jison grammar for converting numerals into an integer */ | |
/* The lexical analyzer | |
How we break things up into tokens */ | |
%lex | |
%% | |
[0-9]+ return 'INT' | |
"-" return '-' |
This file contains 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
/* Part of the grammar of Steve */ | |
%lex | |
%% | |
\s+ { /* ignore whitespace */ } | |
[0-9]+"."[0-9]+\b { return 'FLOAT'; } | |
[0-9]+\b { return 'INT'; } | |
\"[^\"]+\" { yytext = yytext.substr(1, yyleng-2); return 'STR'; } | |
"int" return 'INTTYPE' |
This file contains 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
// express + socket.io example (chat server) | |
// that requires authentication via ldap. | |
// express shares authentication with socket.io. | |
var express = require('express'); | |
var io = require('socket.io'); | |
var ldap = require('./lib/node-ldapauth/ldapauth'); | |
var sessionStore = new express.session.MemoryStore(); // whatever | |
var parseCookie = require('connect').utils.parseCookie; |
This file contains 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
# must set this vi_cv_path_python_plibs var | |
# people say having a trailing slash on the python-config-dir causes problems | |
$ export vi_cv_path_python_plibs="-L/usr/lib64/python2.7/config -lpython2.7 -ldl" | |
$ ./configure --enable-cscope \ | |
--enable-multibyte \ | |
--enable-gui \ | |
--with-python-config-dir=/usr/lib64/python2.7/config \ | |
--enable-pythoninterp=yes \ | |
--with-x \ |