Skip to content

Instantly share code, notes, and snippets.

View lacrosse's full-sized avatar

Alexander Skiba lacrosse

View GitHub Profile
@lacrosse
lacrosse / 01_scrabble.rb
Last active December 26, 2015 15:09
Codingame 2013-10-19
def char_weight(char)
case char
when "e", "a", "i", "o", "n", "r", "t", "l", "s", "u"
1
when "d", "g"
2
when "b", "c", "m", "p"
3
when "f", "h", "v", "w", "y"
4
#!/bin/bash
if [[ -n "$2" ]]; then
device=$2
else
device="eth0"
fi
if [ "start" = "$1" ]; then
ifconfig wlan0 192.168.150.1

Keybase proof

I hereby claim:

  • I am lacrosse on github.
  • I am lacrosse (https://keybase.io/lacrosse) on keybase.
  • I have a public key whose fingerprint is 30C5 6D8C BD20 5010 58B5 450D D223 CF07 53D9 278E

To claim this, I am signing this object:

require "json"
require "msgpack"
require "benchmark"
hash = {
collection: Array.new(ARGV[0].to_i) do
{
name: "Stranger in a Room",
array: ["this", "that", "and this"],
string: "A simple interface to the benchmark method, bm is generates sequential reports with labels."
defmodule SecureRandom do
def hex(number \\ 16) do
:crypto.strong_rand_bytes(number)
|> Base.encode16(case: :lower)
end
end
@lacrosse
lacrosse / sum_pyramids.rb
Last active November 12, 2021 00:39
Sum Pyramids logic programming solution
require "mini_kanren"
def suc(nat)
[:suc, nat]
end
def int_to_nat(i)
i == 0 ? :zero : suc(int_to_nat(i - 1))
end