This has been moved to a regular Github repo:
View gist:9172432
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Basic Usage | |
=========== | |
Assuming your markup looks like this: | |
<table id="table" class="table"></table> | |
<div id="pagination" class="text-center"></div> |
View _README.md
TinyVM
TinyVM is a simple register based virtual machine implemented in C (tinyvm.c
). The bytecode assembler is written in Python (tas.py
). 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
-------|---------|-------------------------------|--------------------|------------
View log.rake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
Time.new(*values.map(&:to_f)) | |
end | |
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/ |
View angular-2.md
Angular 2 - Build Better Apps
62nd Workshop
🍀 Thursday, March 17, 2016 🍀
Slides: https://frontendmasters.com/assets/resources/lukasruebbelke/better-apps-angular-2-day2.pdf
View pipes.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby -w | |
if ENV['DEBUG'] | |
def debug(message) | |
$stderr.puts message | |
end | |
else | |
def debug(message) | |
# nop | |
end |
View why-ayo.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
<3 |
View TextFormatter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default (text) => text; |
View clean-react-native-app.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
OlderNewer