Skip to content

Instantly share code, notes, and snippets.

passcod@archpire ~> gem install simple-rss; pry
Fetching: simple-rss-1.3.1.gem (100%)
Successfully installed simple-rss-1.3.1
Parsing documentation for simple-rss-1.3.1
Installing ri documentation for simple-rss-1.3.1
Done installing documentation for simple-rss after 0 seconds
1 gem installed
[1] pry(main)> require 'simple-rss'
=> true
[2] pry(main)> require 'open-uri'
@passcod
passcod / dc.rb
Last active August 29, 2015 14:18
Implementation of GNU's dc (reverse-polish arbitrary-precision stack-based command-line calculator) in Ruby
#!/usr/bin/env ruby
require 'bigdecimal'
class Dc
def initialize
@stack = []
@registers = []
# TODO: support these

Keybase proof

I hereby claim:

  • I am passcod on github.
  • I am passcod (https://keybase.io/passcod) on keybase.
  • I have a public key whose fingerprint is C24C ED9C 5790 0009 12F3 BAB4 B948 C4BA E44F C474

To claim this, I am signing this object:

                                                                     
                [
1 bom
1 E
1 G
1 llZn7Ic
1 MI_
1 OU
1 q_dHJi04
1 stdout
2 base_url
2 cable_actions
1 A
1 A4
1 A5
1 A6
1 Aa
1 AA
1 ac3_bsi_offset
1 AC3header
1 accept
1 action_function
rustc 1.0.0 (a59de37e9 2015-05-13) (built 2015-05-14)
binary: rustc
commit-hash: a59de37e99060162a2674e3ff45409ac73595c0e
commit-date: 2015-05-13
build-date: 2015-05-14
host: x86_64-unknown-linux-gnu
release: 1.0.0
@passcod
passcod / coc
Last active August 29, 2015 14:23
#!/usr/bin/bash
file="CODE_OF_CONDUCT.md"
gitroot="$(git rev-parse --show-toplevel)"
if [[ -z "$gitroot" ]]; then
exit
fi
cd "$gitroot"
url="http://contributor-covenant.org/version/1/1/0/code_of_conduct.md"
import Twitter from 'twitter';
const client = new Twitter({
consumer_key: process.env.TWITTER_CONSUMER_KEY,
consumer_secret: process.env.TWITTER_CONSUMER_SECRET,
access_token_key: process.env.TWITTER_ACCESS_TOKEN_KEY,
access_token_secret: process.env.TWITTER_ACCESS_TOKEN_SECRET
});
let getFaves = function () {
@passcod
passcod / markup.html
Created April 30, 2011 04:35
Another way to hide emails from robots
<span id="email">@</span>