This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
["Esc","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12",{w:2},"Delete"], | |
[{a:7,w:1.5},"",{a:4},"F13","Up","Fn4","Fn5","Fn7","Fn9","F14","Prtsc","Scrlk","Pause\nBreak","Up","F15",{w:1.5},"Insert"], | |
[{a:7,w:1.75},"",{a:4},"Left","Down","Right","Fn6","Fn8","Fn10",{a:7},"",{a:4},"Home","Pgup","Left","Right",{a:7,w:2.25},""], | |
[{a:4,w:2.25},"LShift","Fn2","Fn1","Fn3",{a:7},"",{a:4},"Voldn","Volup","Mute","End","Pgdn","Down",{w:2.75},"RShift"], | |
[{w:1.25},"LCtrl",{w:1.25},"LAlt",{w:1.25},"LWin",{w:6.25},"Fn11",{a:7,w:1.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},""] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
[ | |
"Esc", | |
"F1", | |
"F2", | |
"F3", | |
"F4", | |
"F5", | |
"F6", | |
"F7", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": [ | |
"kms:Decrypt", | |
"kms:Encrypt", | |
"kms:GenerateDataKey", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Tested on | |
-- PostgreSQL 9.6.2 (rds, db.t2.micro) | |
-- PostgreSQL 10.3 (rds, db.t2.micro) | |
create table stuff ( | |
id bigserial primary key, | |
firstname text, | |
lastname text, | |
amount integer, | |
created_at timestamp default current_timestamp | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
region = "eu-central-1" | |
} | |
# | |
# Create DynamoDB table | |
# columns: userId, noteId | |
# | |
resource "aws_dynamodb_table" "jr-notes-1" { | |
name = "jr-notes-1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Random quick uuidv4 implementation | |
// https://gist.github.com/jed/982883 | |
const b = ( | |
a // placeholder | |
) => { | |
return a // if the placeholder was passed, return | |
? ( // a random number from 0 to 15 | |
a ^ // unless b is 8, | |
Math.random() // in which case | |
* 16 // a random number from |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
numbers = [50, 43, 73, 22] | |
data = numbers.map.with_index do |x, i| | |
return { "a": i, "b": x } | |
end | |
puts(data) // => {"a"=>0, "b"=>50} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if ! [ -x "$(command -v jj)" ]; then | |
brew tap tidwall/jj | |
brew install jj | |
fi | |
while true; do | |
echo -n "`date` " && \ | |
curl -s 'https://www.posti.fi/henkiloasiakkaat/seuranta/api/shipments' \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This way you can customize which branches should be skipped when | |
# prepending commit message. | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=(master development) | |
fi | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
[[ "$BRANCH_NAME" =~ ((XX|xx){1}-[0-9]+) ]] && BRANCH_NAME=${BASH_REMATCH[1]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDH5Wpcp8DX2lO8q9QPIjFQKMpca5t44HV0LHaazHnTFbfIiwSAARk816E/kjt5Q6vOZ2WPKAafueb+cnzsQt+mEf/QNOMXqf3BQK001vBHaDi7zXe4iJJKfHxfOQ9XzzXaywyWRbi/dQjeFIXvRG9ee2lFRm3b4y4s7aqcpZJe8j83P/C0arMv3gI2Ij5b4QXXUSPcXnR5EtZ66nIwSz214ql5nXUO1Fsmk3g7YNCMaM634ZQ60blkbW+820C6E5MmtY7o6+te8Oozhs6WA+A2geoJjwdEFYywjysKa3WFkqztMc7YGoAeCoLdzINeIV9x+U8pVEnMBpZ8TbeJQMst [email protected] |