Skip to content

Instantly share code, notes, and snippets.

View vastus's full-sized avatar
🦅
all(good)

Juho Hautala vastus

🦅
all(good)
View GitHub Profile
-- customer IDs and ID types
DELETE FROM dm_b2c_marketing.customer_b2c;
INSERT INTO dm_b2c_marketing.customer_b2c (
customer_id,
id_domain,
dp_customer_id
) VALUES (
'shogun-alice',
'shogun',
'dp-inner-alice'
lengthAndSum :: [Int] -> State Int Int
lengthAndSum [] = return 0
lengthAndSum (x:xs) = do
let (len, sum) = runState (lengthAndSum xs) x
put (sum + x)
return (len + 1)
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>redir</title>
</head>
<body>
<input id="input" type="number" value="403" />
<button id="button">Action</button>
<script>
@vastus
vastus / keybase.md
Created February 10, 2017 09:13
Keybase

Keybase proof

I hereby claim:

  • I am vastus on github.
  • I am juhoth (https://keybase.io/juhoth) on keybase.
  • I have a public key ASBmtwoVKbckGE3DA_90YacDCscTQ8VUNmu9JY4CYvknEQo

To claim this, I am signing this object:

require 'axlsx'
require 'byebug'
rows = [
[nil, nil, nil, "Mitkä seikat"],
["Etunimi", "Sukunimi", "HETU", "Esimies", "Ympäristö", "Työtehtävä", "Kuormitus"],
["Olli", "Isometsä", "123456-000X", "Kyllä", "Ei", "Kyllä"],
]
Axlsx::Package.new do |p|
@vastus
vastus / .vimrc
Last active July 26, 2016 11:28
Remove colorcolumn that editorconfig-vim inserts
g:EditorConfig_max_line_indicator = "none"
@vastus
vastus / näytöt.md
Last active July 19, 2016 10:27
Näytöt
@vastus
vastus / enable_repeating_keys.sh
Created April 4, 2016 08:00
Repeating keys on Mac OSX
defaults write -g ApplePressAndHoldEnabled 0
grammar = [
("exp", ["exp", "+", "exp"]),
("exp", ["exp", "-", "exp"]),
("exp", ["(", "exp", ")"]),
("exp", ["num"]),
]
def expand(tokens, grammar):
for pos in range(len(tokens)):
for rule in grammar:
@vastus
vastus / userconfig.cfg
Created March 13, 2016 11:04
cs1.6 user conf
// http://steamcommunity.com/sharedfiles/filedetails/?id=126383209
rate 20000
sv_lan_rate 20000
cl_cmdrate 105
cl_updaterate 100
fps_max 100
sys_ticrate 1000
cl_shadows 0
net_graphwidth 250