TODO: intro
- DigitalOcean
- 512 MB RAM
| SELECT * FROM posts WHERE body ILIKE '%zweitag%' |
| { | |
| "hello": "world" | |
| } |
| # Inspired by these blog posts: | |
| # http://dev.mikamai.com/post/100075543414/elixir-as-a-parsing-tool-writing-a-brainfuck | |
| # http://dev.mikamai.com/post/102283561929/elixir-as-a-parsing-tool-writing-a-brainfuck | |
| defmodule Brainfuck do | |
| @op_decv "-" | |
| @op_incv "+" | |
| @op_decp "<" | |
| @op_incp ">" | |
| @op_putc "." |
| defmodule MyEnum do | |
| defmacro filter_matching(collection, pattern) do | |
| quote do | |
| Enum.filter unquote(collection), fn | |
| unquote(pattern) -> true | |
| _ -> false | |
| end | |
| end | |
| end | |
| end |
| require 'open3' | |
| command = 'sh' | |
| Open3.popen2e(command) do |stdin, stdout_and_stderr, wait_thread| | |
| Thread.new do | |
| stdout_and_stderr.each {|l| puts l } | |
| end | |
| stdin.puts 'ls' |
| class Array | |
| def to_proc | |
| ->(obj) { obj.public_send *self } | |
| end | |
| end | |
| input = <<EOS | |
| foo,bar,baz | |
| hello,world | |
| 1,2,3 |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import sys | |
| def inspect(s): | |
| if s is None: | |
| return '"None"' | |
| return '"' + str(s) + '"' |
| netstat -anp tcp | awk '$6 ~ "LISTEN" && $4 ~ "22$"' |
| function gitio { curl -fsi git.io -F "url=$1" | grep 'Location' | sed 's/.*: //' | tee >(pbcopy) } |