This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env sh | |
| ## | |
| # This is script with useful tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2263406/osx.sh | sh | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Version": "2008-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "PublicReadForGetBucketObjects", | |
| "Effect": "Allow", | |
| "Principal": { | |
| "AWS": "*" | |
| }, | |
| "Action": "s3:GetObject", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ExampleController < ApplicationController | |
| rescue_from Exception, :with => :render_custom | |
| def render_custom(exception) | |
| if Exceptional::Remote.error(Exceptional::ExceptionData.new(exception, "Test Exception")) | |
| Rails.logger.info "Exceptional: #{exception.class} has been reported to Exceptional" | |
| else | |
| Rails.logger.error "Exceptional: Problem sending exception. Check your API key." | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| it "should etc, etc" do | |
| using_constants( SomeClass, { :CONST_A => stub, :CONST_B => 1 } ) do | |
| # ... | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :admin do | |
| mount Resque::Server, :at => '/resque' | |
| # ... | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| InjectedScript._type = function(obj) | |
| { | |
| // ... some code ... | |
| // ... some conditions ... | |
| // Add our own: | |
| if (obj.__proto__ && obj.__proto__.jquery) | |
| return "array"; | |
| // ... leave the fall back ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!(path-to-python, eg. /usr/bin/python) | |
| import sqlite3 | |
| db = sqlite3.connect( "stats.sqlite3" ) | |
| db.cursor().execute( "CREATE TABLE IF NOT EXISTS " \ | |
| "visits ( page TEXT, timestamp TEXT, ip TEXT )" ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="footer"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <a href="somewhere.com" rel="external" title="somewhere.com"> | |
| somewhere.com | |
| </a> |