Skip to content

Instantly share code, notes, and snippets.

@connor
connor / .jshintrc.js
Created January 11, 2012 22:20
jshintrc example
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum error before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
@evansd
evansd / gist:1639992
Created January 19, 2012 13:09
Global find and replace using ack
function substitute {
if [ -z "$1" -o -z "$2" ]; then
echo "Usage: substitue FROM_STRING TO_STRING [OPTION]..."
echo
echo "Replace all occurances of FROM_STRING (a sed-compatible regular"
echo "expression) with TO_STRING in all files for which ack-grep matches"
echo "FROM_STRING."
echo
echo "Any additional options are passed directly to ack-grep (e.g.,"
echo " --type=html would only run the substitution on html files)."
@mrmurphy
mrmurphy / shallow.js
Created June 6, 2012 20:03
Shallow water implementation (Requires three.js)
/* Author: Murphy Randle
Just a very simple shallow water simulation.
Heavily helped by code from: Paul Lewis: http://aerotwist.com/
*/
var cam, scene, renderer, geo, mesh, mat, projector, grid;
// Params to change simulation:
var gridWidth = 65;
var gridRes = 58;
@maxim
maxim / tm2iterm.rb
Created June 10, 2012 04:04
Convert TextMate themes into iTerm 2 color schemes.
#!/usr/bin/env ruby
#
# This script is an astonishing feat of top notch
# rockstar craftsmanship. It totally uses artificial
# intelligence to extract colors out of tmTheme and
# build an itermcolors scheme file for iTerm2.
#
# I know this sounds crazy, but it actually knows
# approximately what colors should be used in the
# ANSI list, and tries to find nearest colors from
@rocketnova
rocketnova / tm2iterm.rb
Created June 19, 2012 20:45 — forked from maxim/tm2iterm.rb
Convert TextMate themes into iTerm 2 color schemes.
#!/usr/bin/env ruby
#
# This script is an astonishing feat of top notch
# rockstar craftsmanship. It totally uses artificial
# intelligence to extract colors out of tmTheme and
# build an itermcolors scheme file for iTerm2.
#
# I know this sounds crazy, but it actually knows
# approximately what colors should be used in the
# ANSI list, and tries to find nearest colors from
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 14, 2024 18:00
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@max-mapper
max-mapper / readme.md
Created August 22, 2012 05:08
things I wish github notified me about

the new github notifications (https://github.com/blog/1204-notifications-stars) leaves me wanting more!

  • when someone comments on a gist that I either own or have also commented on
  • when someone comments on a commit (in a project that I'm not part of) that I have commented on
  • when someone makes a commit to a fork of one of my repos

notifications settings should let you choose whether or not to receive emails for the above things. there should also be a web UI that shows you a list of all comments/messages for the above scenarios. at the moment https://github.com/notifications only shows you github issue names which is less useful than showing the actual message (the old notifications page showed actual messages)

@evalica
evalica / CSScomb Alphabetical order
Created October 2, 2012 17:13
See CSScomb (http://csscomb.com/) for more details. Alphabetical order can be used by replacing $default_sort_order variable in "/Sublime Text 2/Packages/CSScomb/csscomb/libs/csscomb.php" with the following code:
$default_sort_order = '[
"-webkit-animation",
"-moz-animation",
"-ms-animation",
"-o-animation",
"animation",
"-webkit-animation-delay",
"-moz-animation-delay",
"-ms-animation-delay",
"-o-animation-delay",
@sourcebits-arjunvariar
sourcebits-arjunvariar / tm2iterm.rb
Created October 9, 2012 08:25 — forked from maxim/tm2iterm.rb
Convert TextMate themes into iTerm 2 color schemes.
#!/usr/bin/env ruby
#
# This script is an astonishing feat of top notch
# rockstar craftsmanship. It totally uses artificial
# intelligence to extract colors out of tmTheme and
# build an itermcolors scheme file for iTerm2.
#
# I know this sounds crazy, but it actually knows
# approximately what colors should be used in the
# ANSI list, and tries to find nearest colors from
@mrmurphy
mrmurphy / Error
Last active December 16, 2015 03:59
This is the code I have, but this is the error I get back after clicking the 'search' button:
Exception from Deps recompute: Error: Error copying attribute '"': Error: InvalidCharacterError: DOM Exception 5
at Function.Spark._Patcher._copyAttributes (http://localhost:3000/packages/spark/patch.js?299cb25985c501315fbd758353d7f498697a39c3:494:19)
at Spark._Patcher.match (http://localhost:3000/packages/spark/patch.js?299cb25985c501315fbd758353d7f498697a39c3:249:26)
at http://localhost:3000/packages/spark/patch.js?299cb25985c501315fbd758353d7f498697a39c3:61:23
at visitNodes (http://localhost:3000/packages/spark/patch.js?299cb25985c501315fbd758353d7f498697a39c3:17:11)
at visitNodes (http://localhost:3000/packages/spark/patch.js?299cb25985c501315fbd758353d7f498697a39c3:18:9)
at visitNodes (http://localhost:3000/packages/spark/patch.js?299cb25985c501315fbd758353d7f498697a39c3:18:9)
at visitNodes (http://localhost:3000/packages/spark/patch.js?299cb25985c501315fbd758353d7f498697a39c3:18:9)