Skip to content

Instantly share code, notes, and snippets.

@douglasrodrigo
douglasrodrigo / gist:3707089
Created September 12, 2012 14:42
lambda-calculus factorial
True = ->(a,b) {a}
False = ->(a,b) {b}
#Church encodings
zero = ->(f){->(x) {x}}
one = ->(f){->(x) { f.(x)}}
two = ->(f){->(x) { f.(f.(x))}}
three =->(f){->(x) { f.(f.(f.(x)))}}
#operations
@douglasrodrigo
douglasrodrigo / gist:3788109
Created September 26, 2012 13:41
ssh tunnel port
Accessing a server port through another server
ssh -N -L<local_port>:<server>:<port> <another_server>
import org.jruby.*;
import org.jruby.ast.executable.AbstractScript;
import org.jruby.ast.executable.RuntimeCache;
import org.jruby.internal.runtime.methods.CallConfiguration;
import org.jruby.javasupport.util.RuntimeHelpers;
import org.jruby.runtime.*;
import org.jruby.runtime.builtin.IRubyObject;
public class person extends AbstractScript
{
apiVersion: batch/v1
kind: Job
metadata:
name: aws-s3-import
spec:
backoffLimit: 4
template:
spec:
containers:
- name: aws-cli