Skip to content

Instantly share code, notes, and snippets.

View qrush's full-sized avatar
🕸️
Making internets

Nick Quaranto qrush

🕸️
Making internets
View GitHub Profile
@jsmestad
jsmestad / assets.yml
Created July 27, 2011 20:43
Rails 3.0.x runtime compilation and asset packaging with Barista and Jammit on Heroku
# config/assets.yml
package_assets: on
compress_assets: on
# compress_assets: off
javascript_compressor: uglifier
javascripts:
all:
@skiz
skiz / gist:1137135
Created August 10, 2011 15:27
MONKEY PATCH: Selenium::WebDriver::Error::UnhandledError (NS_ERROR_ILLEGAL_VALUE)
# File: spec/support/capybara_patch.rb
#
# This patch attempts to fix a race condition in the selenium web driver
# Reference: https://code.google.com/p/selenium/issues/detail?id=2099
class Capybara::Selenium::Driver
def find(selector)
browser.find_elements(:xpath, selector).map { |node| Capybara::Selenium::Node.new(self, node) }
rescue Selenium::WebDriver::Error::UnhandledError => e
e.message =~ /nsIDOMXPathEvaluator.createNSResolver/ ? retry : raise
@schacon
schacon / plumbing.md
Created August 18, 2011 04:51
plumbing cheat sheet

the plumbing commands

  • rev-parse [something]

    • show the SHA of any weird git phrase
  • hash-object -w [file]

    • take any file or stdin and return a blob sha
  • ls-tree (-r) [sha]

  • show the entries of a git tree in the db

@bluefuton
bluefuton / gist:1468061
Created December 12, 2011 16:15
OS X: replace tabs with spaces in all files using expand
find . -name "*.php" | while read line; do expand -t 4 $line > $line.new; mv $line.new $line; done
module TestCaseMixin
include YARD::CodeObjects
def create_test_method(name)
test_name = 'test_' + name.to_s.gsub(/\W/, '_')
register MethodObject.new(namespace, test_name, :instance)
end
end
class LegacyTestCaseHandler < YARD::Handlers::Ruby::Legacy::Base
@panicsteve
panicsteve / gist:1641705
Created January 19, 2012 18:26
Form letter template for acquired startups
Dear soon-to-be-former user,
We've got some fantastic news! Well, it's great news for us anyway. You, on
the other hand, are fucked.
We've just been acquired by:
[ ] Facebook
[ ] Google
[ ] Twitter
@trevorturk
trevorturk / gist:1756760
Created February 7, 2012 02:37
Bare minimum html5 template
<!DOCTYPE html>
<html>
<head>
<title>title</title>
</head>
<body>
<p>body</p>
</body>
</html>
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 1, 2025 01:48
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:

@DamonOehlman
DamonOehlman / README.md
Last active October 30, 2023 20:03
General WebRTC tips and tricks collated over time
@bobspryn
bobspryn / preferredFontDescriptorWithTextStyle sizes and styles
Created December 11, 2013 01:12
Apple iOS7 sizes and traits for all UIFontTextStyle's and UIContentSizeCategory's
UIContentSizeCategoryExtraSmall
FontStyle: UICTFontTextStyleBody
Point size 14.000000
Family Name .AppleSystemUIBody
FontStyle: UICTFontTextStyleHeadline
Point size 14.000000
Family Name .AppleSystemUIHeadline
Bold
FontStyle: UICTFontTextStyleSubhead
Point size 12.000000