Skip to content
View proxyMethod.coffee
class X.Example extends X.Object
@proxyMethod "attachmentManager.manageAttachment"
# Equivalent to:
# manageAttachment: ->
# @attachmentManager.manageAttachment.apply(@attachmentManager, arguments)
@proxyMethod "delegate?.compositionDidChangeDocument"
# Equivalent to:
# compositionDidChangeDocument: ->
# @delegate?.compositionDidChangeDocument?.apply(@delegate, arguments)
View bashprof.94736.log
1384798995.146761
program=/Users/sam/.rbenv/shims/ruby --version
command=set -e
subshell=0
function=main
filename=/Users/sam/.rbenv/shims/ruby
lineno=2
1384798995.147108
program=/Users/sam/.rbenv/shims/ruby --version
command=[ -n "$RBENV_DEBUG" ]
View Simple Encryption.md

Simple file/stream encryption using OpenSSL

Create and store a 512-byte random encryption key named secret:

$ mkkey secret

Encrypt the contents of file with the secret key and write it to file.enc:

$ encrypt secret < file > file.enc
#!/usr/bin/env bash
source super.bash
foo() {
echo hello
}
super_function foo
foo() {
From: Sam Stephenson <sstephenson@gmail.com>
Subject: Re: ruby-build hint
Date: Sun, 10 Feb 2013 12:25:56 -0600
To: Michał Papis <mpapis@gmail.com>
Hi Michał,
Thanks for the email.
You're right that `[[` is not POSIX sh-compliant. Nor are the following
View curl-progress
#!/usr/bin/env bash
#
# Wraps curl with a custom-drawn progress bar. Use it just like curl:
#
# $ curl-progress -O http://example.com/file.tar.gz
# $ curl-progress http://example.com/file.tar.gz > file.tar.gz
#
# All arguments to the program are passed directly to curl. Define your
# custom progress bar in the `print_progress` function.
#
View git-semver-tags
#!/bin/sh
#
# Usage: git semver-tags [-p|--pre]
#
# Lists semver tags in the repository in order from newest to oldest.
#
# Useful for e.g. programmatically finding the latest release tag:
# `git semver-tags | head -n 1`.
#
# Tag names must be valid according to the SemVer 1.0.0 specification
View test_interrupt.rb
# Sledgehammer approach for ^Cing rake test runs
if Rails.env.test?
if `ps -wwp #{Process.ppid}` =~ /ruby/
trap("INT") {
Process.kill("KILL", Process.ppid)
Process.kill("KILL", Process.pid)
}
end
end
#!/usr/bin/env coffee
class TestCase
@run: (print, callback) ->
tests = (new this testName for testName in @getTestNames())
results = []
passed = true
print "1..#{tests.length}"
#!/usr/bin/env bats
load test_helper
setup() {
load_fixture rehash
}
teardown() {
destroy_fixture
Something went wrong with that request. Please try again.