Skip to content

Instantly share code, notes, and snippets.

<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">
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
class CreditCardResource
include JsonRpc::Resource
service_api 'http://localhost:3000/billing/credit_cards'
property :number
property :type
end
begin
# 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.
#!/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
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
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() {
#!/usr/bin/env ruby
require "rubygems"
require "uri"
require "open-uri"
require "net/http"
require "json"
host = "http://localhost:3000"
command = ARGV[0]
@russ
russ / gist.vim
Created September 14, 2010 17:22
"=============================================================================
" 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.
@russ
russ / gist.vim
Created September 14, 2010 17:22
" Usage:
"
" :Gist
" post whole text to gist.
"
" :'<,'>Gist
" post selected text to gist.
"
" :Gist -p
" post whole text to gist with private.