Skip to content

Instantly share code, notes, and snippets.

View fsvehla's full-sized avatar

Ferdinand Svehla fsvehla

View GitHub Profile
class Routing::Router
def initialize(recipient, options = {})
options.assert_valid_keys(:customer)
@customer = options[:customer]
@recipient = PhoneNumber.new(recipient).internationalise(:local_country => @customer.site_country)
end
def destination
destination = (
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
var lastKnownOrientation = null;
function rotate() {
if(window.orientation != lastKnownOrientation) {
lastKnownOrientation = window.orientation;
updateRotation();
}
}
function updateRotation() {
FinancialTransaction::ErsteBankImporter.any_instance.expects(:initialize).once.with(anything, {:foo => 42})
FinancialTransaction.detect_importer(
StringIO.new("Bezeichnung;Valutadatum;Betrag;Währung\n"),
:foo => 42
)
module DeepFreezing
# „Deep freezes“ the array, that is:
# - if the element responds to deep_freeze itself,
# like Array and Hash should, call it.
# - if the element responds to freeze, call it
# - freeze self
#
# ==== Returns
# self
#
zfs recv -d ~/bc.zone.zfs rpool
# That included /zones/bc, /zones/bc/ROOT and /zones/bc/ROOT/zbe
zonecfg -z bc create -a /zones/bc
zoneadm -z bc attach
The -a or -r option is required when there is no active root dataset.
pfexec zoneadm -z bc attach -r /zones/bc
cannot create 'rpool/zones/bc/ROOT': dataset already exists
while out_open || err_open
next unless ready = IO.select([out_pipe], [err_pipe], nil, Ticks)
if ready.flatten.include?(out_pipe)
out_open = (output.write(out_pipe.readpartial(BlockSize - 2)) rescue false)
end
if ready.flatten.include?(err_pipe)
err_open = (errors.write(err_pipe.readpartial(BlockSize - 2)) rescue false)
end
start_time = timestamp
open = true
status = Open4.popen4(command) do |pid, _, out, err|
while(open)
elapsed = (timestamp - start_time)
if elapsed > CommandTimeout
out.close rescue puts "out close err"
We couldn’t find that file to show.
source .paths # Sets up $PATH
export EDITOR="vim"
export GIT_EDITOR=${EDITOR}
export MANPATH="$PATH:/usr/share/man:/opt/local/share/man"
# No reason to export shell variables to each application.
PS1="[\u@\h \w \$] "