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
.love { | |
.heart(hotpink, 200px); | |
.transform-rotate(15deg); | |
} | |
.heart(@color: red, @size: 100px) { | |
position: relative; | |
width: @size; | |
height: 90px; |
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
#!/usr/bin/env python | |
# determines filename and extension, then delegates compiling the LESS files to lessc via a shell command | |
import sys, os.path | |
from subprocess import call | |
src = sys.argv[1] | |
base,ext = os.path.splitext(src) |
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
// adapted from: http://stackoverflow.com/questions/901115/get-query-string-values-in-javascript | |
// wrapped it in a module and only exposing a getter function make the datastructure immutable | |
// usage: var bla = QueryString.get('loginEnabled') | |
var QueryString = (function () { | |
var urlParams = {}; | |
var e, | |
a = /\+/g, // Regex for replacing addition symbol with a space | |
r = /([^&=]+)=?([^&]*)/g, | |
d = function (s) { return decodeURIComponent(s.replace(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
Show hidden characters
{ | |
"selector": "source.ts", | |
"cmd": ["tsc", "$file"], | |
"file_regex": "^(.+?) \\((\\d+),(\\d+)\\)(: .+)$", | |
"line_regex": "\\((\\d+),(\\d+)\\)", | |
"osx": { | |
"path": "/usr/local/bin:/opt/local/bin" |
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
/*global $ */ | |
/* | |
_______ _______ _______ _______ _______ _______ _______ ___ _ | |
| || _ || || || _ || || || | | | | |
| ___|| |_| || || ___|| |_| || _ || _ || |_| | | |
| |___ | || || |___ | || | | || | | || _| | |
| ___|| || _|| ___|| _ | | |_| || |_| || |_ | |
| | | _ || |_ | |___ | |_| || || || _ | |
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
/* | |
I recently got one of those 8x8 LED matrices and I was playing with some Game of Life patterns when I found this pretty repeating pattern. I found it by starting with some random patterns. If you look closely you can see the pattern becoming a mirrored version of itself halfway through. Apparently the pattern doesn't repeat like this on an infinite grid but on this wrapping 8x8 grid it does ;-) | |
FYI, the LED matrix is a bicolor one (green/red) and has an I2C interface (http://www.adafruit.com/products/902). I'm using the colors as follows: | |
- newly created cells are green | |
- cells that are at least 10 generations old are red | |
- other living cells are yellow (simultaneously green+red) | |
It's hookup up to my Arduino Uno r3. |
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
// A KITT scanner made out of 12 deep red LEDs hooked up to nothing but an ATTiny85. | |
// It leverages the magic of charlieplexing to enable the ATTiny to drive those 12 LED's with just 4 pins. | |
// | |
// video: http://www.youtube.com/watch?v=MYvrKLcG-Vg | |
const int blue = 0; | |
const int green = 1; | |
const int red = 2; | |
const int white = 3; |
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
function registerUnderscoreHelpers() { | |
for (key in _) { | |
var prop = _[key]; | |
if (typeof(prop) == 'function' ) { | |
createUnderscoreHelper(key, prop); | |
} | |
} | |
} | |
// Spacebars always passes an extra argument to the helper, an |
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
Classes = new Mongo.Collection(‘classes’); | |
Classes.insert({ | |
location: "Aa en Hunze", | |
schoolType: "Basisonderwijs", | |
route: "42", | |
active: true | |
}); | |
<button data-action=continue |
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
Fast, incremental Lua uploads for NodeMCU | |
INSTALLATION | |
1. This script requires nodemcu-uploader and gulp to be installed globally: | |
$ npm install -g gulp | |
$ npm install -g nodemcu-tool | |
$ pip install nodemcu-uploader |
OlderNewer