Skip to content

Instantly share code, notes, and snippets.

Timo Sand deiga

Block or report user

Report or block deiga

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View functions.sh
# MIT License
#
# Copyright (c) 2019 Carlos Castaño
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@deiga
deiga / .editorconfig
Created Jan 11, 2019
Editorconfig-example
View .editorconfig
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
@deiga
deiga / mac_games.txt
Last active Apr 14, 2018
MP Games playable on my mac
View mac_games.txt
Civ V
Civ VI
Crusader Kings II
Diablo III
Don't Starve Together
Door Kickers
Dungeon of the Endless
Divinity: Original Sin
Endless Legends
Endless Space
@deiga
deiga / migrate_autojump_fasd.sh
Last active Jan 29, 2018
Migrate from autojump to fasd on macOS
View migrate_autojump_fasd.sh
cat ~/Library/autojump/autojump.txt | awk -v date="$(date +%s)" '{ print $2 "|" $1 "|" date }' > ~/.fasd
View kirjoja.txt
Books:
Star Wars: Kloonien Hyökkäys - Kuvitettu opas
Star Wars: Kloonien Hyökkäys - Rakenteiden salaisuudet
Kim Harrison - A Fistful of Charms
Michael Moorcock - Blood
Dan Brown - Deception Point
P.C. Cast - Betrayed (House of Night 2)
P.C. Cast - Chosen (House of Night 3)
P.C. Cast - Untamed (House of Night 4)
@deiga
deiga / unfoldr.kt
Created Oct 22, 2017
Kotlin unfoldr
View unfoldr.kt
fun <T,R> unfoldRight(f: (T) -> Pair<R, T>?, b: T): List<R> {
val maybePair: Pair<R, T>? = f(b)
return if ( maybePair == null) {
listOf()
} else {
listOf(maybePair.first) + unfoldRight(f, maybePair.second)
}
}
@deiga
deiga / .stCommitMsg
Last active Jun 21, 2018
git config --global commit.template ~/.stCommitMsg
View .stCommitMsg
# 50-character subject line
#
# 72-character wrapped longer description.
# Why is this change necessary?
Why:
*
View www.uusimuste.fi_2017-08-28_15-04-29.lighthouse.report.json
{"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3198.0 Safari/537.36","lighthouseVersion":"2.4.0","generatedTime":"2017-08-28T12:04:29.937Z","initialUrl":"https://www.uusimuste.fi","url":"https://www.uusimuste.fi/","audits":{"is-on-https":{"score":true,"displayValue":"","rawValue":true,"extendedInfo":{"value":[]},"scoringMode":"binary","name":"is-on-https","category":"Security","description":"Uses HTTPS","helpText":"All sites should be protected with HTTPS, even ones that don't handle sensitive data. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prerequisite for HTTP/2 and many new web platform APIs. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/https).","details":{"type":"list","header":{"type":"text","text":"Insecure URLs:"},"items":[]}},"redirects-http":{"score":true,"displayValue":"","rawValue":true,"scoringMode":"binary","name":
View www.uusimuste.fi_2017-05-19_10-52-08.lighthouse.report.json
{"lighthouseVersion":"1.6.5","generatedTime":"2017-05-19T07:52:08.040Z","initialUrl":"https://www.uusimuste.fi","url":"https://www.uusimuste.fi/","audits":{"is-on-https":{"score":true,"displayValue":"","rawValue":true,"extendedInfo":{"formatter":"urllist","value":[]},"name":"is-on-https","category":"Security","description":"Uses HTTPS","helpText":"All sites should be protected with HTTPS, even ones that don't handle sensitive data. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prerequisite for HTTP/2 and many new web platform APIs. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/https)."},"redirects-http":{"score":true,"displayValue":"","rawValue":true,"name":"redirects-http","category":"Security","description":"Redirects HTTP traffic to HTTPS","helpText":"If you've already set up HTTPS, make sure that you redirect all HTTP traffic to HTTPS. [Learn more](https://developers.google.com/web/tools/light
@deiga
deiga / install_node.sh
Created Mar 27, 2017
Node installation script with bash
View install_node.sh
function install_node() {
local REQUIRED_MAJOR_NODE_VERSION=${REQUIRED_NODEJS_VERSION:0:1}
echo "${BLUE}Which version manager do you want to install node.js with? If you don't know, choose 'brew'${NORMAL}:"
select NODE_VERSION_MANAGER in 'brew' 'nvm' 'nodenv' 'other';
do
case $NODE_VERSION_MANAGER in
'nvm'|'nodenv')
verify_command $NODE_VERSION_MANAGER
set +x
$NODE_VERSION_MANAGER install $REQUIRED_MAJOR_NODE_VERSION
You can’t perform that action at this time.