Skip to content

Instantly share code, notes, and snippets.

Job hunting

Tamara Temple tamouse

Job hunting
View GitHub Profile
View gist:9172432
cons = ->(x,y){ ->(a){ a.(x,y) } }
car = ->(c){ c.(->(x,_){ x }) }
cdr = ->(c){ c.(->(_,y){ y }) }
pair = cons.(1,2)
puts car.(pair)
puts cdr.(pair)
View gist:ade30f868bd122707628
Basic Usage
Assuming your markup looks like this:
<table id="table" class="table"></table>
<div id="pagination" class="text-center"></div>
tamouse /
Last active August 29, 2015 14:08
My Rails Application Template

This has been moved to a regular Github repo:



TinyVM is a simple register based virtual machine implemented in C (tinyvm.c). The bytecode assembler is written in Python ( TinyVM has 4 registers ($0 - $3) and 64k of memory in a 32-bit address space (0x00000000 - 0x0000FFFF).

Each instruction is encoded in a single 64-bit word. Register count and memory are defined at compile time, but due to only having 32 bits available for addressing and 8 bits for registers, allocating more than 4GB of memory or 256 registers is pointless.

The following instructions (loosely based on MIPS) have been implemented:

No.    | Keyword | Instruction                   | Example            | Description


mwlang / log.rake
Last active August 29, 2015 14:21
This set of tasks scans a Ruby Logger file and tallies timestamps. It finds first timestamp and last timestamp recorded in the log and prints out start/start times, elapsed time, and the logfile it scanned. Additionally, if you use the Sequel gem and log SQL to the log file, it extracts the SQL, parameterizes those SQLs so we can group 'em and g…
View log.rake
namespace :log do
def timestamp line
values = line.match(/(\d{4})\-(\d{2})\-(\d{2})T(\d{2})\:(\d{2})\:(\d{2}\.\d{6})/).captures*
task :timestamps do
Dir.glob(File.join(log_path, '*.log')).each do |fn|
top = `head -n 2 #{fn}`.split("\n")
top.shift if top[0] =~ /Logfile created/
marknorgren /
Last active March 28, 2016 22:21
Building Web Apps with Angular 2
rklemme / pipes.rb
Last active September 9, 2016 14:14
Execute multiple commands connected through pipes either via threads or processes.
View pipes.rb
#!/usr/bin/ruby -w
def debug(message)
$stderr.puts message
def debug(message)
# nop
View why-ayo.txt
As a core member of the team: I believe that node is lacking in what it does to support its community, its governance model
is currently a mess and I don't feel that it is easy for the majority of people to contribute. This did not start and does
not end with whatever has been occurring in node over these past two weeks. These have been my feelings for over two years
now. I have experienced this first hand as a former part of node, as I sat within the now defunct Inclusivity Working Group.
It's time to try something new.
maxx-coffee / TextFormatter.js
Created November 9, 2017 19:10
Dependency injection via javascript
View TextFormatter.js
export default (text) => text;
brampersandon /
Last active January 7, 2019 15:43
A quick helper util for getting a misbehaving React Native environment back to normal.
alias clean-rn="watchman watch-del-all && rm -fr $TMPDIR/npm* && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && yarn cache clean && rm -rf ios/build && rm -rf ios/Pods && rm -rf android/.gradle && rm -rf android/.idea && rm -rf android/build && rm -rf android/app/build && rm -rf android/app/app.iml && yarn"