This file contains 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
// ==UserScript== | |
// @match http://*.paulirish.com/* | |
// @match http://www.paulirish.com/* | |
// ==/UserScript== | |
(document.getElementsByTagName('canvas')[0]).parentElement.removeChild(document.getElementsByTagName('canvas')[0]); |
This file contains 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 | |
curl -s http://whatthecommit.com/ | grep "<p>" | sed 's/<p>//' | sed 's/^/"/' | sed 's/$/"/' | xargs git commit -m |
This file contains 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($) | |
{ | |
$.fn.extend({ | |
alternating: function(options) | |
{ | |
var options = options; | |
var currentElement = -1; | |
var timeout = 0; | |
// Create focus and blur events for all inputfields |
This file contains 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 | |
cp $1 ~/Dropbox/Public/ | |
echo "http://dl.dropbox.com/u/USERID/$1" | pbcopy |
This file contains 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
TimeFormatter = | |
to_pretty: (date)-> | |
now = new Date() | |
date = new Date(date) | |
# Time ago in seconds | |
a = (now - date) / 1000 | |
if a is 0 then 'akkurat nå' | |
else if a is 1 then 'ett sekund siden' |
This file contains 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
/* line 3, tooltip.css.sass */ | |
.tooltip { | |
margin-top: 5px; | |
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); | |
opacity: 0; | |
position: absolute; | |
padding: 7px 0 14px; | |
} | |
/* line 10, tooltip.css.sass */ | |
.tooltip i { |
This file contains 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
web: /usr/local/sbin/nginx -p `pwd`/tmp/nginx/ -c ../../nginx.conf | |
fastcgi: /usr/local/sbin/php-fpm | |
db: /usr/local/bin/mysqld |
This file contains 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
require 'sass_extensions' |
This file contains 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
formatPrice = (price)-> | |
return '0' if isNaN(price) | |
price = price + '' | |
price = price.split(/\./) | |
decimals = price[1] | |
price = price[0] | |
iterations = price.length / 3 | |
i = price.length | |
segments = [] |
This file contains 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
- (void)adjustViewForTextField:(UITextField*)textField animated:(BOOL)animated { | |
CGRect frame = self.view.frame; | |
double screenSize = 480.0; | |
double topHeight = 20.0; | |
double keyboardSize = 216.0; | |
double keyboardPos = screenSize - keyboardSize; | |
double textFieldPos = topHeight + textField.frame.origin.y; | |
double textFieldHeight = textField.frame.size.height; | |
double textFieldBottom = textFieldPos + textFieldHeight; |
OlderNewer