I hereby claim:
- I am jc00ke on github.
- I am jc00ke (https://keybase.io/jc00ke) on keybase.
- I have a public key whose fingerprint is 820A 5BE1 B38C 55E5 1C2C A163 FA06 5807 F03A B48B
To claim this, I am signing this object:
#compdef tmuxinator mux | |
# zsh completion for tmuxinator | |
# Install: | |
# $ mkdir -p ~/.tmuxinator/completion | |
# $ cp _tmuxinator ~/.tmuxinator/completion | |
# $ vi ~/.zshrc # add the following codes | |
# fpath=($HOME/.tmuxinator/completion ${fpath}) | |
# autoload -U compinit |
#!/bin/sh | |
# Cisco Anyconnect CSD wrapper for OpenConnect | |
CSTUB="$HOME/.cisco/hostscan/bin/cstub" | |
$ARCH=$(uname -m) | |
if [[ "$ARCH" == "x86_64" ]] | |
then |
I hereby claim:
To claim this, I am signing this object:
case point | |
pattern (x, y): ... # 2d point | |
pattern (x, y, z): ... # 3d point | |
pattern (x, y, z, w): ... # quaternion | |
# etc. |
sealed abstract class Expression | |
case class X() extends Expression | |
case class Const(value : Int) extends Expression | |
case class Add(left : Expression, right : Expression) extends Expression | |
case class Mult(left : Expression, right : Expression) extends Expression | |
case class Neg(expr : Expression) extends Expression | |
def eval(e : Expression, x : Int) : Int = e match { | |
case X() => x | |
case Const(c) => c |
beach(Temperature) -> | |
case Temperature of | |
{celsius, N} when N >= 20, N =< 45 -> | |
'favorable'; | |
{kelvin, N} when N >= 293, N =< 318 -> | |
'scientifically favorable'; | |
{fahrenheit, N} when N >= 68, N =< 113 -> | |
'favorable in the US'; | |
_ -> | |
'avoid beach' |
# pulled out of a project authored by tpope && rbxbx | |
# not generic enough for general use, but a decent example of | |
# an application specific restful crud abstraction | |
module Incrudable | |
extend ActiveSupport::Concern | |
included do | |
expose(controller_name) { controller_name.classify.constantize.scoped } | |
expose(controller_name.singularize) |
server { | |
listen [YOUR IP]:80; | |
server_name *.dev.jc00ke.com; | |
location / { | |
if ($host ~* "(.*)\.dev\.jc00ke\.com" ) { | |
set $tunnel_app $1.lvh.me; | |
} | |
proxy_set_header X-Real-IP $remote_addr; |
# Simple, scrappy UDP DNS server in Ruby (with protocol annotations) | |
# By Peter Cooper | |
# | |
# MIT license | |
# | |
# * Not advised to use in your production environment! ;-) | |
# * Requires Ruby 1.9 | |
# * Supports A and CNAME records | |
# * See http://www.ietf.org/rfc/rfc1035.txt for protocol guidance | |
# * All records get the same TTL |
~ maglev ✔ maglev-irb -f | |
irb(main):001:0> b = proc { p 1 } | |
=> #<Proc> | |
irb(main):002:0> b.instance_variable_get("@_st_block") | |
=> #<ExecBlock:0x561a6201 | |
irb(main):003:0> block = b.instance_variable_get("@_st_block") | |
=> #<ExecBlock:0x561a6201 | |
irb(main):004:0> block.class | |
=> ExecBlock | |
irb(main):005:0> block.class.primitive '_sourceString', '_sourceString' |