Skip to content

Instantly share code, notes, and snippets.

View fsrc's full-sized avatar

Fredrik Andersson fsrc

View GitHub Profile
@fsrc
fsrc / main.fal
Created August 3, 2011 07:19
Made up fantasy language FAL
# If I could design my own language, it would look something like this.
#
#  + Indentation matters instead of curly braces.
#  + Nothing but
#    - Functions
#    - Lists
#  + Predefined types
#    - Number =
#        + = (Number)
#        - = (Number)
@venj
venj / down_celebrating_steve.rb
Created October 24, 2011 02:22
Download "A Celebration of Steve's Life" from apple. http://events.apple.com.edgesuite.net/10oiuhfvojb23/event/index.html This script is based on previous WWDC keynote download script: https://gist.github.com/1012426
#!/usr/bin/env ruby
require 'open-uri'
if ["--help", "help", "-h"].include?(ARGV[0]) || ARGV.size < 1
puts "Usage: #{File.basename __FILE__} ( 540p | 540i | 360p | 360i | 360is | 224p )"
exit 0
end
size_hash = {"540p" => "2540", "540i" => "1840", "360p" => "1240", "360i" => "0640", "360is" => "0440", "224p" => "0240"}
video_size = size_hash[ARGV[0]]
@hallettj
hallettj / for.sibilant
Created July 29, 2013 01:22
Demonstration of a monad comprehension macro in Sibilant, a Lisp dialect that compiles to JavaScript. See http://sibilantjs.info/ for information on Sibilant.
; A monad comprehension is a syntactic construct that translates
; synchronous-looking code into a callback-based implementation. Monads
; are a very general abstraction - which means that monad comprehensions
; have more expressive power than other sync-to-async code
; transformations.
; Here is an example that uses jQuery's $.get method to fetch resources:
(def post-with-author (id)
(for