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
initialize : function ( props ) { | |
var self = this; | |
var triggerCallback = function ( newValue, oldValue ) { | |
var attribute = this; | |
if ( !attribute.isChanged ) { | |
attribute.isChanged = newValue != oldValue; | |
} | |
} |
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 JooseX.Attribute.Dirty | |
* | |
* Add _isDirty_ property if an attribute has been changed with setter method. | |
* | |
**/ | |
Role('JooseX.Attribute.Dirty', { | |
override : { |
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 | |
# | |
# This script installs and configures couchdb on a fresh Amazon Linux AMI instance. | |
# | |
# Must be run with root privileges | |
# Tested with Amazon Linux AMI release 2011.02.1.1 (ami-8c1fece5) | |
# | |
export BUILD_DIR="$PWD" |
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 Beans | |
from : [ 'Central America', 'South America', 'East Africa' ] | |
brand : 'Gevalia' | |
name : 'Ebony' | |
class Coffee extends Beans | |
sugar : no | |
milk : no | |
people = [ 'Andreas', 'Sofia' ] |
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
// add UIScrollViewDelegate | |
@interface AppDelegate : PhoneGapDelegate <UIScrollViewDelegate> |
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
for file in `ls *.jpg.jpg`; do mv $file $file:gs/.jpg.jpg/.jpg/; done |
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
fs = require 'fs' | |
log = console.log | |
spawn = require('child_process').spawn | |
task 'server', 'Start server.coffee and restart on file change', -> | |
log "Starting server, kill with Ctrl-c" | |
server = spawn "coffee", ["server.coffee"] | |
server.stdout.on "data", (data) -> | |
log "#{data}" |
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
sudo yum install git nginx pcre-devel libxml2-devel libxslt-devel gd-devel geoip-devel | |
curl -O http://nginx.org/download/nginx-1.0.4.tar.gz | |
git clone git://github.com/yaoweibin/nginx_tcp_proxy_module | |
tar zxf nginx-1.0.4.tar.gz | |
cd nginx-1.0.4/ | |
patch -p1 < ../nginx_tcp_proxy_module/tcp.patch | |
./configure --add-module=../nginx_tcp_proxy_module/ --user=nginx --group=nginx --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --wi |
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
nameserver 127.0.0.1 | |
port 20560 |
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/sh | |
URL=`curl -i http://git.io -F "url=$1" | grep Location | sed -e 's/Location: //g'` | |
echo "$URL" | pbcopy | |
echo "$URL" |