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
/**_______________________________________ | |
* | |
* nfx :: simple effects in few bytes | |
* --------------------------------------- | |
* | |
* @author Andrea Giammarchi | |
* @site http://www.devpro.it/nfx/ | |
* @version 0.4 | |
* @requires anything * | |
* * old browsers (IE <= 5) should require JSL |
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 "openssl" | |
require "net/smtp" | |
Net::SMTP.class_eval do | |
private | |
def do_start(helodomain, user, secret, authtype) | |
raise IOError, 'SMTP session already started' if @started | |
check_auth_args user, secret, authtype if user or secret | |
sock = timeout(@open_timeout) { TCPSocket.open(@address, @port) } |
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
tell application "Safari" | |
activate | |
do JavaScript "alert( '123' );" in document 1 | |
end tell |
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 | |
#DB_CONSTR='-h host -u user -ppasswd -P 20306 searchms' | |
#SQL='select * from foo' | |
#FILTER='{ printf "%s\n", $0 }' | |
SCRIPTFILE=`basename $0` | |
OUTFILE=${SCRIPTFILE/.sh/.txt} | |
JOBNAME=${SCRIPTFILE/.sh/} | |
SCRIPTDIR=$( (cd -P $(dirname $0) && pwd) ) |
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
from fabric.api import * | |
""" | |
Base configuration | |
""" | |
env.project_name = '$(project)' | |
env.database_password = '$(db_password)' | |
env.site_media_prefix = "site_media" | |
env.admin_media_prefix = "admin_media" | |
env.newsapps_media_prefix = "na_media" |
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
import random | |
GOAT = 0 | |
CAR = 1 | |
class Door: | |
def __init__(self, index): | |
self.index = index | |
self.gift = GOAT |
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
import re | |
from mechanize import Browser | |
br = Browser() | |
br.set_handle_robots(False) | |
br.open("http://www.instapaper.com") | |
br.follow_link(text="Log In") | |
#print br.title() | |
br.select_form(nr=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
/* | |
* Hibernate, Relational Persistence for Idiomatic Java | |
* | |
* Copyright (c) 2010, Red Hat Inc. or third-party contributors as | |
* indicated by the @author tags or express copyright attribution | |
* statements applied by the authors. All third-party contributions are | |
* distributed under license by Red Hat Inc. | |
* | |
* This copyrighted material is made available to anyone wishing to use, modify, | |
* copy, or redistribute it subject to the terms and conditions of the GNU |
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
foo:KeyBindings evacuee$ pwd | |
/Users/evacuee/Library/KeyBindings | |
foo:KeyBindings evacuee$ cat DefaultKeyBinding.dict | |
{ | |
/* home */ | |
"\UF729" = "moveToBeginningOfLine:"; | |
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; /* end */ |
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
coffee -c pinboard.coffee ; echo -n 'javascript:'; cat pinboard.js | tr '\n' ' ' | sed 's/ / /g' | sed 's/ / /g' |
OlderNewer