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
<div id="messages"></div> | |
<form> | |
<input id="message" type="text" /> | |
<input type="submit" value="Send" /> | |
</form> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> | |
<script type="text/javascript"> |
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
sudo gem install bundler | |
mkdir appname && cd appname && echo 'directory "vendor/rails", :glob => "{*/,}*.gemspec" | |
gem "rails", "3.0.pre", :git => "git://github.com/rails/rails.git" | |
git "git://github.com/rails/arel.git" | |
git "git://github.com/rails/rack.git"' > Gemfile | |
gem bundle | |
bin/rails . -s |
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
class CreditCardResource | |
include JsonRpc::Resource | |
service_api 'http://localhost:3000/billing/credit_cards' | |
property :number | |
property :type | |
end | |
begin |
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
# Example MySQL config file for very large systems. | |
# | |
# This is for a large system with memory of 1G-2G where the system runs mainly | |
# MySQL. | |
# | |
# You can copy this file to | |
# /etc/my.cnf to set global options, | |
# mysql-data-dir/my.cnf to set server-specific options (in this | |
# installation this directory is /usr/local/mysql/data) or | |
# ~/.my.cnf to set user-specific options. |
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 ruby | |
require File.join(File.dirname(__FILE__), '..', 'lib', 'sheen') | |
Sheen::Url.destroy_all | |
class Server < EventMachine::Connection | |
include Sheen::Server | |
def backends |
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
ffmpeg -y -threads 2 -i $1 -r 29.97 -vcodec libx264 -s 320x240 -aspect 4:3 -flags +loop -cmp +chroma -deblockalpha 0 -deblockbeta 0 -b 800kb -maxrate 1250k -bufsize 4M -bt 256k -refs 1 -coder 0 -me_method full -me_range 16 -subq 7 -partitions +parti4x4+parti8x8+partp8x8 -g 250 -keyint_min 25 -rc_eq 'blurCplx^(1-qComp)' -level 30 -qmin 10 -qmax 51 -qcomp 0.6 -trellis 2 -sc_threshold 40 -i_qfactor 0.71 -acodec libfaac -ab 112k -ar 48000 -ac 2 $2 |
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
def greet(subject:String) { | |
def greeting(subject:String) = "Hello, %s!".format(subject) | |
println(greeting(subject)) | |
} | |
greet("World") | |
class PlayerCharacter(name:String, hp:Int) { | |
def name() { |
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 ruby | |
require "rubygems" | |
require "uri" | |
require "open-uri" | |
require "net/http" | |
require "json" | |
host = "http://localhost:3000" | |
command = ARGV[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
"============================================================================= | |
" File: gist.vim | |
" Author: Yasuhiro Matsumoto <[email protected]> | |
" Last Change: 29-Mar-2010. | |
" Version: 3.5 | |
" WebPage: http://github.com/mattn/gist-vim/tree/master | |
" Usage: | |
" | |
" :Gist | |
" post whole text to gist. |
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
" Usage: | |
" | |
" :Gist | |
" post whole text to gist. | |
" | |
" :'<,'>Gist | |
" post selected text to gist. | |
" | |
" :Gist -p | |
" post whole text to gist with private. |