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 ruby | |
| # Usage: tweetsplit.rb < tweetstorm.txt | |
| # https://twitter.com/CoralineAda/status/869204799027372032 | |
| # Sam Stephenson / 2017-05-29 | |
| # Tweet-sized version: | |
| # puts $<.read.split(/\s+/).reduce(nil){|(*cs,c),w|n=[c,w].compact*" ";cs+(n.size>140?[c,w]:[n])}*"\n" | |
| def chunks_for(words, chunk_size) |
| 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) |
| 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" ] |
| #!/usr/bin/env bash | |
| source super.bash | |
| foo() { | |
| echo hello | |
| } | |
| super_function foo | |
| foo() { |
| From: Sam Stephenson <[email protected]> | |
| Subject: Re: ruby-build hint | |
| Date: Sun, 10 Feb 2013 12:25:56 -0600 | |
| To: Michał Papis <[email protected]> | |
| Hi Michał, | |
| Thanks for the email. | |
| You're right that `[[` is not POSIX sh-compliant. Nor are the following |
| #!/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. | |
| # |
| # 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}" |