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
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"> |
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
#import "PomTaskView+Constraints.h" | |
@implementation PomTaskView (Constraints) | |
- (void)updateConstraints { | |
[super updateConstraints]; | |
NSMutableArray *constraints = [NSMutableArray new]; | |
NSDictionary *views = [self subviewsDictionary]; |
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
// want to uses this module like: | |
// `var $ = require('jquery');` | |
// | |
// so it incudes all plugins | |
var jquery = require('actual-jquery'); | |
require('plugin.jquery'); | |
module.exports = jquery; |
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
{ | |
"ease": [0.25, 0.1, 0.25, 1.0], | |
"linear": [0.00, 0.0, 1.00, 1.0], | |
"ease-in": [0.42, 0.0, 1.00, 1.0], | |
"ease-out": [0.00, 0.0, 0.58, 1.0], | |
"ease-in-out": [0.42, 0.0, 0.58, 1.0] | |
} |
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
# Detect unsuppoerted browsers exculding crawlers and chrome frame | |
# browser gem - https://github.com/fnando/browser | |
def is_unsupported_browser? | |
is_ie = browser.ie6? || browser.ie7? || browser.ie8? | |
is_firefox36 = browser.firefox? && browser.full_version.match(/^3.6.*/) | |
is_crawler = request.env["HTTP_USER_AGENT"].match(/\(.*https?:\/\/.*\)/) if request.env["HTTP_USER_AGENT"] | |
has_chrome_frame = request.env["HTTP_USER_AGENT"].match(/chromeframe/) if request.env["HTTP_USER_AGENT"] | |
return !has_chrome_frame && (is_ie || is_firefox36) unless is_crawler |
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
ffmpeg -i moviet.flv -f mp3 sound.mp3 |
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
#!/bin/bash | |
# play jay-z | |
jayz() { | |
osascript <<-EOF | |
tell application "iTunes" to play track 1 of playlist "Jay-Z" | |
EOF | |
} |
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
# load rails or RACK app if runnning pry in a project | |
if Dir.exists? './config' | |
current_app = './config/application.rb' if File.exists? './config/application.rb' | |
current_app = './config/environment.rb' if File.exists? './config/environment.rb' | |
require current_app if current_app | |
end | |
if defined? Rails && Rails.version[0..0] == "3" | |
require 'rails/console/app' | |
require 'rails/console/helpers' |
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
function () { | |
return Backbone.View.prototype.render(this, arguments); | |
return Backbone.View.prototype.render(this, Array.prototype.slice.call(arguments)); | |
} |
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
curl http://www.cl.cam.ac.uk/~rja14/Papers/SE-[01-10].pdf -o renamed_file_#1.pdf |