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
<?php | |
class openpneTruncateTablesTask extends sfBaseTask | |
{ | |
protected function configure() | |
{ | |
$this->addOptions(array( | |
new sfCommandOption('application', null, sfCommandOption::PARAMETER_OPTIONAL, 'The application name', true), | |
new sfCommandOption('env', null, sfCommandOption::PARAMETER_REQUIRED, 'The environment', 'dev'), | |
new sfCommandOption('no-confirmation', null, sfCommandOption::PARAMETER_NONE, 'Whether to force dropping of the database') |
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
<?php | |
class A { | |
function A() { echo "bar\n"; } | |
} | |
class B extends A {} | |
class C extends B {} | |
class D extends C { | |
function D() { | |
parent::__construct(); | |
parent::A(); |
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 'formula' | |
def build_java?; ARGV.include? "--java"; end | |
def build_perl?; ARGV.include? "--perl"; end | |
def build_python?; ARGV.include? "--python"; end | |
def build_ruby?; ARGV.include? "--ruby"; end | |
def with_unicode_path?; ARGV.include? '--unicode-path'; end | |
class UniversalNeon < Requirement | |
def message; <<-EOS.undent |
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 'formula' | |
class Php < Formula | |
url 'http://jp2.php.net/get/php-5.3.10.tar.bz2/from/this/mirror' | |
md5 '816259e5ca7d0a7e943e56a3bb32b17f' | |
homepage 'http://www.php.net/' | |
version '5.3.10' | |
depends_on 'jpeg' | |
depends_on 'mcrypt' |
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
""" | |
WebSocket Client for Growl Notification | |
Requirements: | |
- websocket-client: | |
https://github.com/liris/websocket-client | |
- Growl: | |
http://growl.info/documentation/developer/python-support.php | |
""" |
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/sh | |
labeled_diff() | |
{ | |
if [ $1 ]; then | |
diff -u --label "local/init.el" ../init.el --label "gist/init.el" init.el | |
else | |
diff -u --label "gist/init.el" init.el --label "local/init.el" ../init.el | |
fi | |
} |
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/sh | |
git --git-dir=$(brew --repository)/.git --work-tree=$(brew --repository) checkout Library/Formula/emacs.rb | |
brew update | |
brew uninstall emacs | |
curl "https://gist.github.com/raw/857132/emacs.rb.patch" | patch -p1 -d $(brew --repository) | |
brew install emacs --cocoa | |
ln -sf $(brew --prefix emacs)/Emacs.app /Applications |
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
;;; ~/.emacs.d/init.el | |
;; | |
;; Emacs 23.3 on Mac OS X 10.6 のことしか考えていません | |
;; | |
;;; Emacs ビルド | |
;; | |
;; Homebrew で自分用のパッチを当ててビルドする | |
;; https://gist.github.com/857132 | |
;; |
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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Private</name> | |
<list> | |
<item> | |
<name>EISUU to Escape (except Emacs)</name> | |
<identifier>remap.jis_eisuu2escape_ex_emacs</identifier> | |
<not>EMACS</not> | |
<autogen>--KeyToKey-- KeyCode::JIS_EISUU, KeyCode::ESCAPE</autogen> |
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
#!/usr/bin/env python | |
import httplib | |
def check(letter): | |
conn = httplib.HTTPConnection("twitter.com") | |
conn.request("HEAD", "/naoya_"+letter) | |
return conn.getresponse().status == 200 | |
if __name__ == '__main__': |
NewerOlder