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
#!/bin/bash | |
declare -a EXTS=("jpg" "jpeg" "png" "gif") | |
DEBUG=0 | |
WIDTH=100 | |
HEIGHT=100 | |
OUT_DIR="" | |
SUFFIX="" | |
INPUTS=() |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#include <HSBColor.h> | |
#include <Adafruit_NeoPixel.h> | |
#define BUTTON_PIN 3 | |
#define MODES_COUNT 7 | |
#define LED_PIN 6 | |
#define LED_COUNT 4 | |
int mode = 0; | |
bool modeButtonPressed = false; |
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
function rgbToHex(color) { | |
const [ r, g, b ] = color.substring(4, color.length - 1).split(', '); | |
return '#' + [ r, g, b ].map(x => { | |
const hex = parseInt(x).toString(16); | |
return hex.length === 1 ? '0' + hex : hex | |
}).join(''); | |
} |
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
// Stylus version of SCSS mixin from http://codepen.io/awesomephant/pen/mAxHz | |
long-shadow(type = 'box', base-color = rgba(#000, .2), length = 100, fadeout = true, skew = false, direction = 'right') | |
shadow = '' | |
if !skew || type == 'text' | |
if direction == 'right' | |
for i in (0..length - 1) | |
shadow = shadow + i + 'px ' + i + 'px 0 ' + base-color + ',' |
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
/** | |
* Browser utility | |
* | |
* Exports utility methods to detect browser types and versions from userAgent | |
*/ | |
/** | |
* Returns true if is IE browser equal or below given version | |
* | |
* @param {Number} version |
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
#!/bin/bash | |
################################################################### | |
## Usage: ./indent_4_to_2_spaces.sh lib/**/*.js www/css/**/*.css ## | |
################################################################### | |
echo Re-indenting ${$#-2} files from 4 to 2 spaces... | |
for (( i=1; i<=$#; i++ )); do | |
sed -e 's/^/~/' -e ': r' -e 's/^\( *\)~ /\1 ~/' -e 't r' -e 's/~//' ${!i} > ${!i}.tmp && mv ${!i}.tmp ${!i} |
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
'strict mode' | |
const fs = require('fs') | |
const path = require('path') | |
/** | |
* Re-prefix utility | |
* | |
* Usage: re-prefix [ dir ] [ prefix ] [ new_prefix ] | |
* E.g. re-prefix ./icons soc- social-icon- |
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
function extend () { | |
var out = arguments[0], | |
i, key, obj, val; | |
for (i = 1; i < arguments.length; i += 1) { | |
obj = arguments[i]; | |
for (key in obj) { | |
if (obj.hasOwnProperty(key)) { | |
val = obj[key]; |
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
module.exports = -> console.log ''' | |
███████ ███████ | |
████------████ ██ | |
██------------██ ██ | |
██------████████████ ██ | |
██------████████████████ ██ | |
██--████ ██████ | |
████████ ██ ██ ██----██ ██████████████████████████████████████████████ | |
██ ████ ██ ██ ██----██ ██ ██ |