Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@theel0ja
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
theel0ja / google_helpful_404_page.html
Last active September 8, 2018 07:14
google helpful 404 page
<script>
var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),GOOG_FIXURL_SITE = location.host;
</script>
<script src="https://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
<!-- https://github.com/theel0ja/google-linkhelp-improver -->
<link rel="stylesheet" href="https://cdn.theel0ja.info/libs/google-linkhelp-improver/dist/style.css">
<script src="https://cdn.theel0ja.info/libs/google-linkhelp-improver/dist/script.js" defer async></script>
@theel0ja
theel0ja / How to use Git.sh
Last active July 21, 2020 22:01
How to use Git
# First, make SSH keys.
ssh-keygen
# Save the SSH keys to ~/.ssh/id_rsa (on Linux) or some other directory
# make .git directory
git init
# add all files, except the files, what are mentioned in .gitignore
git add .
# Make commit
git commit -m "lorem ipsum"
@theel0ja
theel0ja / How to use Git.fi.sh
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)
ssh-keygen
# 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
theel0ja / mysql_secure.sh
Last active May 8, 2018 17:57 — forked from enoch85/mysql_secure.sh
Automating mysql_secure_installation for MySQL 5.7
#!/bin/bash
apt-get -y install expect
SECURE_MYSQL=$(expect -c "
set timeout 10
spawn mysql_secure_installation
expect \"Enter current password for root:\"
@theel0ja
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 www.elisaip.net/utilization.shtml
<?php
// 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="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css"
integrity="sha512-07I2e+7D8p6he1SIM+1twR5TIrhUQn9+I6yjqD53JQjFiMf8EtC93ty0/5vJTZGF8aAocvHYNEDJajGdNx1IsQ=="
crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet.js"
integrity="sha512-A7vV8IFfih/D732iSSKi20u/ooOfj/AGehOKq0f4vLT1Zr2Y+RX7C+w8A1gaSasGtRUZpF/NZgzSAu4/Gc41Lg=="
crossorigin=""></script>
<div id="map"></div>
@theel0ja
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
theel0ja / office-web-viewer.html
Last active December 4, 2023 03:34
Google Docs Viewer and Office Web Apps Viewer
<iframe src="https://view.officeapps.live.com/op/embed.aspx?src=https://calibre-ebook.com/downloads/demos/demo.docx" width="600" height="780" style="border: none;"></iframe>
@theel0ja
theel0ja / Caddyfile
Created January 21, 2018 11:42
Caddyfile for Topfield file sharing
:8080 {
gzip
browse
root /media/topfield
}