I hereby claim:
- I am theoretick on github.
- I am theoretick (https://keybase.io/theoretick) on keybase.
- I have a public key whose fingerprint is 6839 D1A6 800A 1A8F F526 3A62 9860 6992 9D4D 5531
To claim this, I am signing this object:
| #! /bin/bash | |
| # | |
| # Based on http://www.gab.lc/articles/migration_postgresql_9-3_to_9-4 | |
| # | |
| # Make sure only root can run our script | |
| if [ "$(id -u)" != "0" ]; then | |
| echo "This script must be run as root" 1>&2 | |
| exit 1 | |
| fi |
| iex(1)> defmodule Foo do | |
| ...(1)> defp bar do | |
| ...(1)> "bar" | |
| ...(1)> end | |
| ...(1)> end | |
| iex:2: warning: function bar/0 is unused | |
| {:module, Foo, | |
| <<70, 79, 82, 49, 0, 0, 3, 168, 66, 69, 65, 77, 69, 120, 68, 99, 0, 0, 0, 94, 131, 104, 2, 100, 0, 14, 101, 108, 105, 120, 105, 114, 95, 100, 111, 99, 115, 95, 118, 49, 108, 0, 0, 0, 4, 104, 2, ...>>, | |
| {:bar, 0}} | |
| iex(2)> defmodule Derp do |
| #!/usr/bin/env ruby | |
| # generate a growing value for each letter (in this case its place in the alphabet, e.g. j == 9) | |
| # for each character in the string take the index position of the character (where it is in the | |
| # string) and save that value + 1 with the character. Indexes always start w/ zero, that's why | |
| # we need to add 1. `map` means for each value we produce, save them all and return them together. | |
| letters_with_numeric_values = 'abcdefghijklmnopqrstuvwxyz'.chars.each_with_index.map do |letter, i| | |
| [letter, i+1] | |
| end | |
| { | |
| "hobbies": [ | |
| { | |
| "name": "piano", | |
| "tags": [ "#music" ] | |
| }, | |
| { | |
| "name": "kickboxing", | |
| "tags": [ "#sports" ] | |
| }, |
| extern crate hla_rs; | |
| extern crate image; | |
| use hla_rs::extensions; | |
| use image::GenericImage; | |
| use image::ImageBuffer; | |
| fn main() { | |
| let path = &Path::new("/Users/theoretick/code/rust/hla_rs/Test.png"); | |
| let img = image::open(path).unwrap(); |
| { | |
| "auto_match_enabled": false, | |
| "binary_file_patterns": | |
| [ | |
| "*.jpg", | |
| "*.jpeg", | |
| "*.png", | |
| "*.gif", | |
| "*.ttf", | |
| "*.tga", |
| $ for i in `seq 20`; do bundle exec rescue rspec spec/services/seed_service_spec.rb; done |
| [6] website » data = ['foo','bar'] | |
| [7] website » require 'yaml' | |
| => false | |
| [8] website » File.open('foobar_dump.yml','w') do |f| | |
| » YAML.dump(data, f) | |
| » end | |
| => nil | |
| [9] website » |
| (defn prob3 [target] | |
| (let [factorials [] biggest target] | |
| (dotimes [num target] | |
| (if-not (or (contains? [0, 1] num) (> num biggest)) | |
| (if (= (rem target num) 0) | |
| (recur [(/ biggest num) | |
| (if-not (contains? factorials num) | |
| (def factorials (conj factorials num))) |
I hereby claim:
To claim this, I am signing this object: