command line example:
% CFLAGS="-O0 -g" rvm install 2.0.0 --disable-binary
| source 'https://rubygems.org/' | |
| gem 'capybara' | |
| #gem 'capybara-mechanize' | |
| gem 'poltergeist' | |
| gem 'rspec' | |
| PHANTOM_JS='phantomjs-1.9.2-linux-x86_64' | |
| PHANTOM_JS_DIR=unless ENV['PHANTOM_JS_DIR'] | |
| ENV['PHANTOM_JS_DIR'] = File.join(Bundler.root, Bundler.settings[:path], PHANTOM_JS) |
| function ydump() { | |
| # nm: namespace array | |
| # lv: namespace level | |
| # cidt: current indent depth | |
| # lidt: last indent depth | |
| # ac: array counter | |
| awk -v lv=1 -v ac=0 -v cidt=1 -v lidt=1 'BEGIN{ nm[1]=""; } | |
| function path_join(ary, _i,_r,_s) { _r=""; for(_i = 1; _i <= lv; _i++){ _r = _r "/" ary[_i];}; sub("/$", "", _r); sub("^/+", "", _r); return _r; } | |
| # get the current indent depth. | |
| { match($0, /[^ ]+/); cidt=RSTART;} |
| Option Explicit | |
| Dim objWMI, objShell, osInfo, os | |
| ' http://hitaki.net/diary/20090522.html | |
| ' Prompt UAC elevated privilege dialog. | |
| do while WScript.Arguments.Count = 0 and WScript.Version >= 5.7 | |
| Set objWMI = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2") | |
| Set osInfo = objWMI.ExecQuery("SELECT * FROM Win32_OperatingSystem") | |
| #!/bin/bash | |
| function alias_function(){ | |
| [[ $(type -t "$1") = 'function' ]] || return 1; | |
| local buf | |
| buf="function ${2}()" | |
| buf="${buf} $(declare -f "${1}" | tail -n +2)" | |
| eval "$buf" | |
| } |
| RHEL QEMU | |
| ## Ubuntu 12.04 | |
| qemu-kvm_1.0+noroms-0ubuntu14.10 | |
| ``` | |
| $ ls debian/patches/ |
| PluginWrapper p = Jenkins.getInstance().getPluginManager().getPlugin("mailer"); | |
| p.isActive(); | |
| p.isEnabled(); |
| module A | |
| module B | |
| module C | |
| end | |
| end | |
| end | |
| 'A::B::C'.split('::').unshift(Object).inject{|l, o| l.const_get(o) } |
command line example:
% CFLAGS="-O0 -g" rvm install 2.0.0 --disable-binary
# parted /dev/sda
GNU Parted 2.3
Using /var/tmp/5m
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: (file)
Disk /var/tmp/5m: 10.5MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
| require 'celluloid/io' | |
| require 'net/http' | |
| module Celluloid | |
| module IO | |
| # TCPSocket with combined blocking and evented support | |
| class TCPSocket | |
| def eof? |