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
require 'rubygems' | |
require 'blather/client' | |
setup '[email protected]', 'pass' | |
when_ready { puts "Connected ! send messages to #{jid.stripped}." } | |
subscription :request? do |s| | |
write s.approve! | |
end |
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
<error>There is no thread suspended at the time and therefore no context to execute 'next'</error> |
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
CmdUtils.CreateCommand({ | |
name: "flip", | |
execute: function(){ | |
var doc = CmdUtils.getDocument(); | |
jQuery(doc.body).css("-moz-transform", "rotate(180deg)"); | |
} | |
}); | |
CmdUtils.CreateCommand({ |
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
"============================================================================= | |
" File: gist.vim | |
" Author: Yasuhiro Matsumoto <[email protected]> | |
" Last Change: 03-Jul-2009. | |
" Version: 2.7 | |
" WebPage: http://github.com/mattn/gist-vim/tree/master | |
" Usage: | |
" | |
" :Gist | |
" post whole text to gist. |
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
// replaced this | |
$(document).ready(function() { | |
if ($.fn.corner) $('.corner').corner() | |
}) | |
// with this | |
.corner { | |
-moz-border-radius: 8px; | |
-webkit-border-radius: 8px; | |
padding: 3px; |
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
ruby -e "require 'webrick';s=WEBrick::HTTPServer.new :Port=>3001,:DocumentRoot=>Dir.pwd;trap('INT'){s.shutdown};s.start" |
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
object ToRome { | |
sealed class RomeDigit(val value: Int) | |
case object I extends RomeDigit(1) | |
case object V extends RomeDigit(5) | |
case object X extends RomeDigit(10) | |
case object L extends RomeDigit(50) | |
case object C extends RomeDigit(100) | |
case object D extends RomeDigit(500) |
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 -e | |
# Usage: license | |
# Prints an MIT license appropriate for totin' around. | |
# | |
# $ license > COPYING | |
#!/bin/sh | |
echo "Copyright (c) `date +%Y` Chris Wanstrath | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the |
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
require 'rubygems' | |
require 'sinatra' | |
require 'datamapper' | |
require 'dm-paperclip' | |
require 'haml' | |
require 'fileutils' | |
APP_ROOT = File.expand_path(File.dirname(__FILE__)) | |
DataMapper::setup(:default, "sqlite3://#{APP_ROOT}/db.sqlite3") |
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
" Simply swaps lines up and down. No rocket science here. | |
function! s:swap_lines( n1, n2 ) | |
let line1 = getline( a:n1 ) | |
let line2 = getline( a:n2 ) | |
call setline( a:n1, line2 ) | |
call setline( a:n2, line1 ) | |
endfunction | |
function! s:swap_up() |
OlderNewer