Skip to content

Instantly share code, notes, and snippets.

theel0ja / How to use
Last active September 9, 2016 20:21
How to use Git (finnish)
# Ensin, luo SSH-avaimet, jos et ole näin tehnyt
# Tallenna SSH-avaimet sijaintiin ~/.ssh/id_rsa (mikäli käytät Linuxia) tai Macille sopivaan kansioon (jos käytät Macia)
# Luo .git-kansio ja muut alkumäärittelyt
git init
# Lisää kaikki tiedostot muutokseen (commit) paitsi ne, jotka ovat määritelty .gitignore-tiedostossa
git add .
# Luo muutos (commit)
git commit -m "muutoksen kuvaus"
theel0ja / LetsEncryptNginx.MD
Last active April 14, 2017 18:53
Let's encrypt installation to nginx

Let's Encrypt for nginx

Tutorial for installing Let's Encrypt for nginx. Works also with reverse proxy like CloudFlare.

Tested with:

  • Ubuntu 16.04 Server 64-bit
  • Nginx 1.10.0
  • letsencrypt-auto

#Install letsencrypt-auto Use following command to install Let's Encrypt Client:

theel0ja / functions.php
Last active June 10, 2017 12:49 — forked from Esmala/index.php
Network Status Monitor (Convert colour indications in image to percentages) for
// Get coords
function GetCoords() {
$coords = array();
// Non IATA:
// Espoo -> ESP
$coords["HEL2_to_TLL1"] = array(x => 405, y => 286);
$coords["HEL2_to_FRA1"] = array(x => 329, y => 240);
$coords["HEL2_to_ARN4"] = array(x => 345, y => 162);
<link rel="stylesheet" href=""
<script src=""
<div id="map"></div>
theel0ja / Caddyfile
Created July 30, 2017 13:17 — forked from Esmala/index.html
Shep's simplistic city building game
We couldn’t find that file to show.
theel0ja / Caddyfile
Created January 21, 2018 11:42
Caddyfile for Topfield file sharing
:8080 {
root /media/topfield
theel0ja /
Last active March 7, 2018 14:26
HAproxy Let's Encrypt combiner
#!/usr/bin/env bash
# Combine function
combine() {
# move to the correct let's encrypt directory
cd /etc/letsencrypt/live/$SITE
# cat files to make combined .pem for haproxy
cat fullchain.pem privkey.pem > /etc/haproxy/certs/$SITE.pem
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<p class="ciu_embed" data-feature="once-event-listener" data-periods="future_1,current,past_1,past_2" data-accessible-colours="false">
<a href="">Can I Use once-event-listener?</a> Data on support for the once-event-listener feature across the major browsers from
theel0ja /
Last active May 8, 2018 17:57 — forked from enoch85/
Automating mysql_secure_installation for MySQL 5.7
apt-get -y install expect
SECURE_MYSQL=$(expect -c "
set timeout 10
spawn mysql_secure_installation
expect \"Enter current password for root:\"