Skip to content

Instantly share code, notes, and snippets.

@brittbinler
brittbinler / run_eslint.sh
Created October 26, 2020 18:18 — forked from felippenardi/run_eslint.sh
Shell script to Run Eslint only on modified files
#!/bin/bash
CHANGED_FILES=`git diff origin/master...HEAD --name-only`
node_modules/eslint/bin/eslint.js -f json $CHANGED_FILES --quiet | node_modules/eslines/index.js --quiet
if [[ $? != 0 ]] ; then
echo "Fix style violations"
exit 1
fi
echo "All changed files are good"
@brittbinler
brittbinler / catalogbot.js
Created July 6, 2017 13:59 — forked from bcks/catalogbot.js
Cooper Hewitt Catalog Bot
var fs = require('fs'),
PDFDocument = require('pdfkit'),
async = require('async'),
ColorThief = require('color-thief'),
colorThief = new ColorThief();
var bookWidth = 430;
var bookHeight = 343;
@brittbinler
brittbinler / hello_world.c
Created June 7, 2017 16:21 — forked from kripken/hello_world.c
Standalone WebAssembly Example
int doubler(int x) {
return 2 * x;
}
@brittbinler
brittbinler / GIF-Screencast-OSX.md
Created May 31, 2017 22:10 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@brittbinler
brittbinler / gist:8c5cbb995dacf1000c1108b4846dcd5d
Created May 30, 2017 18:17
1hr of power. Wold domination for the web

1hr super challenge

Zero to hero in an hour — how far can you get?

Some of the worlds best open source projects are initally created in < 1 hr. They're inspired, often caffeine, sleep-deprived or just plain crazy-beans fueled ideas that couldn't be done in a day.

The right time, right place (A Friday afternoon) is the perfect time to pump out what could be a life changing project.


So, lets do something interesting: The lazy web 1hr hackaton.

@brittbinler
brittbinler / java_homebrew.sh
Created May 22, 2017 20:35 — forked from kloudsamurai/java_homebrew.sh
Install Java via Homebrew (brew) on Mac OSX with unlimited strength JCE
brew update
brew cask install java
brew cask install jce-unlimited-strength-policy
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
@brittbinler
brittbinler / better-nodejs-require-paths.md
Created May 5, 2017 20:27 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@brittbinler
brittbinler / australian-states-select.html
Created April 24, 2017 16:04 — forked from aswebdev/australian-states-select.html
HTML Select - List of Australian States
<select name="state">
<option value="ACT">Australian Capital Territory</option>
<option value="NSW">New South Wales</option>
<option value="NT ">Northern Territory</option>
<option value="QLD">Queensland</option>
<option value="SA ">South Australia</option>
<option value="TAS">Tasmania</option>
<option value="VIC">Victoria</option>
<option value="WA ">Western Australia</option>
</select>
@brittbinler
brittbinler / progress_indicators.rb
Created April 16, 2017 23:54 — forked from jpo/progress_indicators.rb
Ruby CLI Progress Indicators
# Terminal Progress Indicators. Four examples are included: percentage,
# spinner, progress bar, and combined. This script has been tested on
# Mac OS X 10.8 with Ruby 1.8.7, 1.9.1, 1.9.2, and 1.9.3
class Spinner
include Enumerable
def each
loop do
yield '|'
yield '/'
@brittbinler
brittbinler / Capybara.md
Created April 7, 2017 15:00 — forked from tomas-stefano/Capybara.md
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above