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
" Use Vim settings, rather then Vi settings (much better!). | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
" allow backspacing over everything in insert mode | |
set backspace=indent,eol,start | |
set background=dark | |
set title " set xterm title | |
set history=1000 " keep 1000 lines of command line history |
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
Here's an example of how I was able to use the rsp from Smart.app to run on a different | |
port at the same time. It would be nice if this ability was built into the GUI app, but | |
for now, I hacked it. | |
I made a directory for my app here: | |
/Users/jim/joyent/rsp/local-smartasks | |
I put the application source in a subdirectory called '127.0.0.1'. So the bootstrap.js is | |
at /Users/jim/joyent/rsp/local-smartasks/127.0.0.1/js/bootstrap.js |
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
begin | |
require 'minigems' | |
rescue LoadError | |
require 'rubygems' | |
end | |
if File.directory?(gems_dir = File.join(Dir.pwd, 'gems')) || | |
File.directory?(gems_dir = File.join(File.dirname(__FILE__), '..', 'gems')) | |
$BUNDLE = true; Gem.clear_paths; Gem.path.unshift(gems_dir) | |
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
begin | |
require 'minigems' | |
rescue LoadError | |
require 'rubygems' | |
end | |
if File.directory?(gems_dir = File.join(Dir.pwd, 'gems')) || | |
File.directory?(gems_dir = File.join(File.dirname(__FILE__), '..', 'gems')) | |
$BUNDLE = true; Gem.clear_paths; Gem.path.unshift(gems_dir) | |
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
# :PUBLISHER: markdown, shell, { command: 'rdiscount' } | |
# :BRACKET_CODE: '[ruby]', '[/ruby]' | |
# :TEXT: | |
# | |
# Have you ever started a long operation and walked away from the computer, and | |
# come back half an hour later only to find that the process is hung up waiting | |
# for some user input? It's a sub-optimal user experience, and in many cases it | |
# can be avoided by having the program choose a default if the user doesn't | |
# respond within a certain amount of time. One example of this UI technique in | |
# the wild is powering off your computer - most modern operating systems will |
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 'rubygems' | |
require 'eventmachine' | |
module ChatClient | |
def self.list | |
@list ||= [] | |
end | |
def post_init | |
@name = "anonymous_#{rand(99999)}" |
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
commit 7fba8f5e4978b2ff990304f7150918f1cc0eea74 | |
Author: Aman Gupta <[email protected]> | |
Date: Fri Mar 27 13:51:30 2009 -0700 | |
dtrace patch for 1.8.7 (run autoconf, then ./configure --disable-pthread --enable-dtrace --prefix=/opt/ruby-dtrace) | |
diff --git a/Makefile.in b/Makefile.in | |
index a37bcf6..604bfed 100644 | |
--- a/Makefile.in | |
+++ b/Makefile.in |
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
var cron = require('./cron'), sys = require('sys'); | |
cron.Every((2).seconds(), function() { sys.puts('Working!'); }); |
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
# In .ssh/config: | |
Host * | |
ControlMaster no # Connections by default are not a master | |
ControlPath ~/.ssh/master-%r@%h:%p | |
ServerAliveInterval 60 | |
ServerAliveCountMax 60 | |
# On normal connections, if there is no master running on the ControlPath it will behave as normal | |
ssh some.host |
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 | |
SERVER=https://api.no.de | |
SCRIPT="$0" | |
if [ ${SCRIPT:0:1} == "/" ]; then | |
SCRIPT="$(basename -- "$SCRIPT")" | |
fi | |
main () { | |
cmd=${1-help} |
OlderNewer