Skip to content

Instantly share code, notes, and snippets.

View jdeerhake's full-sized avatar

John Deerhake jdeerhake

View GitHub Profile
@cezaraugusto
cezaraugusto / gpg_fix.txt
Last active November 3, 2023 17:03
fixing `gpg failed to sign data` error on macOS
For troubleshooting, two things to first try:
run `git config --global gpg.program gpg2`, to make sure git uses gpg2 and not gpg
run `echo "test" | gpg2 --clearsign`, to make sure gpg2 itself is working
If that all looks all right, one next thing to try:
run `brew install pinentry` to ensure you have a good tool installed for passphrase entry
If after that install and you re-try git commit and still get the "failed to sign the data" error:
run `gpgconf --kill gpg-agent` to kill any running agent that might be hung
@thulstrup
thulstrup / compass-retina-sprites.scss
Created March 20, 2012 19:18
Using Compass to generate normal and retina sprite maps
$sprites: sprite-map("sprites/*.png");
$sprites-retina: sprite-map("sprites-retina/*.png");
@mixin sprite-background($name) {
background-image: sprite-url($sprites);
background-position: sprite-position($sprites, $name);
background-repeat: no-repeat;
display: block;
height: image-height(sprite-file($sprites, $name));
width: image-width(sprite-file($sprites, $name));
@jdeerhake
jdeerhake / node-lint.js
Created November 10, 2010 05:46
NodeJS wrapper for JSLint (http://www.jslint.com/fulljslint.js) that takes multiple files.
#!/usr/bin/env node
// node-lint.js
// 2010-11-09
/*
2010, John Deerhake, jdeerhake.com
*/
// Node.js wrapper for JSLint
// This is the Node companion to fulljslint.js (http://www.jslint.com/fulljslint.js).
// Add a Mustache.js templating function to your JavaScript:
Mustache.template = function(templateString) {
return function() {
return Mustache.to_html(templateString, arguments[0], arguments[1]);
};
};
// And then, in assets.yml, you can set "template_function" to "Mustache.template".