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
$ ls -ld $rvm_path/* | |
-rw-rw-r-- 1 root rvm 566 May 30 00:54 /usr/local/rvm/LICENCE | |
-rw-rw-r-- 1 root rvm 8662 May 30 00:54 /usr/local/rvm/README | |
-rw-rw-r-- 1 root rvm 7 May 30 00:54 /usr/local/rvm/RELEASE | |
-rw-rw-r-- 1 root rvm 7 May 30 00:54 /usr/local/rvm/VERSION | |
drwxrwsr-x 2 root rvm 4096 May 30 00:43 /usr/local/rvm/archives | |
drwxrwsr-x 2 root rvm 4096 May 30 00:54 /usr/local/rvm/bin | |
drwxrwsr-x 2 root rvm 4096 May 30 00:54 /usr/local/rvm/config | |
drwxrwsr-x 3 root rvm 4096 May 30 00:15 /usr/local/rvm/contrib | |
drwxrwsr-x 2 root rvm 4096 May 30 00:45 /usr/local/rvm/environments |
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
$ rvm get stable | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 185 100 185 0 0 441 0 --:--:-- --:--:-- --:--:-- 1456 | |
100 9249 100 9249 0 0 8117 0 0:00:01 0:00:01 --:--:-- 8117 | |
Downloading RVM from wayneeseguin branch stable | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 125 100 125 0 0 140 0 --:--:-- --:--:-- --:--:-- 174 | |
100 1045k 100 1045k 0 0 304k 0 0:00:03 0:00:03 --:--:-- 440k |
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
$ $JBOSS_HOME/bin/standalone.sh | |
========================================================================= | |
JBoss Bootstrap Environment | |
JBOSS_HOME: /opt/web/torquebox-current/jboss | |
JAVA: java | |
JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml -Xss2048k |
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
function func1(flag){ | |
if(flag){ | |
alert("Caller is here!"); | |
}else { | |
func2(); | |
} | |
} | |
function func2(){ | |
arguments.callee.caller(true); |
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
after "deploy:symlink", "deploy:restart_workers" | |
after "deploy:restart_workers", "deploy:restart_scheduler" | |
## | |
# Rake helper task. | |
# http://pastie.org/255489 | |
# http://geminstallthat.wordpress.com/2008/01/27/rake-tasks-through-capistrano/ | |
# http://ananelson.com/said/on/2007/12/30/remote-rake-tasks-with-capistrano/ | |
def run_remote_rake(rake_cmd) | |
rake_args = ENV['RAKE_ARGS'].to_s.split(',') |
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
load 'deploy' | |
# Uncomment if you are using Rails' asset pipeline | |
load 'deploy/assets' | |
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | |
load 'config/deploy' # remove this line to skip loading any of the default tasks |
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
$ rvm install jruby-1.6.7.2 --1.9 --trace | |
jruby-1.6.7.2 --1.9 --trace | |
rvm 1.14.3 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/] | |
+ [[ -n '' ]] | |
+ export 'PS4=+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > ' | |
+ PS4='+ ${BASH_SOURCE##${rvm_path:-}} : ${FUNCNAME[0]:+${FUNCNAME[0]}()} ${LINENO} > ' | |
+ /scripts/cli : __rvm_parse_args() 795 > [[ -z install ]] | |
+ /scripts/cli : __rvm_parse_args() 797 > [[ 0 -eq 1 ]] |
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
# encoding: utf-8 | |
require 'twitter-text' | |
options = { :username_include_symbol => true } | |
text = "@baozi hi you are a dog #dog" | |
text_cn = "@baozi 嗨你是一条狗诶 #狗狗" | |
text_jp = "@baozi ねえ、あなたは犬だ #犬" | |
puts "=== original ===" |
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
$ jruby --1.9 -S test.rb | |
==== Text in English ==== | |
#<MatchData "@chichi dog dog" 1:"@" 2:"chichi" 3:" dog dog"> | |
1. 11 | |
2. 12 | |
3. 18 | |
==== Text in Chinese ==== | |
#<MatchData "@chichi 狗狗" 1:"@" 2:"chichi" 3:" 狗狗"> | |
1. 0 | |
2. 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
// PgTest.cpp : Defines the entry point for the console application. | |
#include "stdafx.h" | |
#include "libpq-fe.h" | |
#include <iostream> | |
#include <WinSock2.h> | |
#include <time.h> | |
#include <string.h> | |
#include <sstream> | |
#include <vector> |