Input file:
$ cat foo
qwe
123
bar
... | |
module Helpers | |
# Replace standard input with faked one StringIO. | |
def fake_stdin(*args) | |
begin | |
$stdin = StringIO.new | |
$stdin.puts(args.shift) until args.empty? | |
$stdin.rewind | |
yield |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
$stack, $draws = [], {} | |
def method_missing *args | |
return if args[0][/^to_/] | |
$stack << args.map { |a| a or $stack.pop } | |
$draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :< | |
end | |
class Array | |
def +@ |
// Start by adding these | |
import scala.util.{ Try, Success, Failure } | |
/** | |
* Sample runs code that raises the exception: | |
* java.lang.ArithmeticException: / by zero | |
*/ | |
object Sample { | |
def main(args: Array[String]): Unit = { |
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF | |
| FUCKIN PUSSIES | |
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS | |
13:16 <luite> | hello | |
13:16 <ChongLi> | somebody has a mental illness! | |
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel | |
| compelled to write Node.js! | |
13:16 <genisage> | hi | |
13:16 <luite> | you might be pleased to learn that you can compile | |
| haskell to javascript now |
Writing a billing system in Haskell, using Stripe and Heroku | |
=== | |
*This post is written in literate Haskell, meaning the source can be turned | |
into a blogpost or a working program. You can view the [source][source]. | |
[source]: https://gist.github.com/gatlin/7754289 | |
Normally clients pay me with checks, but recently one informed me that they | |
really really really like *really really* super prefer some kind of online |
# A commented nginx configuration file for Ruby on Rails | |
# | |
# Author: Tommaso Pavese | |
# tommaso@pavese.me | |
# http://tommaso.pavese.me | |
# | |
# License: http://www.wtfpl.net/ | |
# | |
# | |
# Tested with: |