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
@vastus
vastus / SassMeister-input-HTML.html
Created August 23, 2015 17:27
Generated by SassMeister.com.
<div id="container">
<div id="clock">
19:03
</div>
</div>
var a = [0, 0, 1, 1, 1, 2, 2, 3, 4, 5, 5, 6, 6, 6]
var wday = 3;
console.log('wday', wday);
for (var i = 0; i < a.length; i++) {
console.log('i',((a[i] + wday) % 7));
}
/*
@vastus
vastus / -
Created October 27, 2015 09:22
select
week_day
from
course_classes
order by
((week_day + 2) % 7) -- where 2 is the current wday
;
week_day
----------
@vastus
vastus / install_ruby_readline_support_using_brew.sh
Created February 21, 2016 20:01
Install ruby w/ readline support using home brew
CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline`" rbenv install 2.3.0
@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
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 / enable_repeating_keys.sh
Created April 4, 2016 08:00
Repeating keys on Mac OSX
defaults write -g ApplePressAndHoldEnabled 0
@vastus
vastus / näytöt.md
Last active July 19, 2016 10:27
Näytöt
@vastus
vastus / .vimrc
Last active July 26, 2016 11:28
Remove colorcolumn that editorconfig-vim inserts
g:EditorConfig_max_line_indicator = "none"
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|