Skip to content

Instantly share code, notes, and snippets.

@mrmurphy
mrmurphy / prepend.bash
Created May 27, 2016 16:45
Insert a line at the beginning of files matching search pattern
# Requires siver-searcher to be installed
FILES=$(ag "<search term here, can be regex>" -l --js)
for i in $FILES; do
echo -e "<stuff to prepend here>\n$(cat $i)" > $i
done
@robertknight
robertknight / hypothesis-webextensions.md
Last active January 23, 2018 18:57
Hypothesis Firefox WebExtensions Prototype Instructions

Hypothesis Firefox WebExtensions prototype

  1. Install Firefox Developer Edition from https://www.mozilla.org/en-GB/firefox/developer/ and run it
  2. Enter "about:config" in Firefox's URL bar and press Enter
  3. Search for "xpinstall.signatures.required" and double click the setting to toggle it to "false"
  4. Download the Firefox WebExtensions prototype build from https://s3.amazonaws.com/io.github.robertknight/hypothesis/prototypes/hypothesis-stage.xpi
  5. Open it in Firefox by going to File -> Open and selecting the downloaded extension

What works:

  • Annotation badge. Looks slightly more attractive than Chrome.
@seanhess
seanhess / index.jsx
Last active August 29, 2015 14:16
Cursor Proposal
const React = window.React = require('react')
const {map, append, partial, curry, compose} = require('ramda')
const shortid = require('shortid')
// STATE --------------------------------------------------------
// returns a state object, and automatically creates sub-cursors
// state.items = cursor to items
// state.items[0] = cursor to items[0].
@paf31
paf31 / 24days.md
Last active August 8, 2023 05:53
24 Days of PureScript

This blog post series has moved here.

You might also be interested in the 2016 version.

@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)
@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
@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",
@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)

@brandonb927
brandonb927 / osx-for-hackers.sh
Last active December 19, 2024 09:32
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
@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