Skip to content

Instantly share code, notes, and snippets.


Leo Taifa Merinen leotm

Block or report user

Report or block leotm

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
leotm / gist:d5b44be19b7cea524701dd93bf02c4cf
Created Jul 17, 2018 — forked from paulirish/gist:4158604
Learn JavaScript concepts with recent DevTools features
View gist:d5b44be19b7cea524701dd93bf02c4cf

Learn JavaScript concepts with the Chrome DevTools

Authored by Peter Rybin , Chrome DevTools team

In this short guide we'll review some new Chrome DevTools features for "function scope" and "internal properties" by exploring some base JavaScript language concepts.


Let's start with closures – one of the most famous things in JS. A closure is a function, that uses variables from outside. See an example:

leotm /
Created Sep 21, 2017 — forked from hyharryhuang/
Restart Ghost Blog
sudo service nginx restart
sudo service ghost restart
leotm / ghost
Created Jul 24, 2017
Original file which worked with HTTPS before went down
View ghost
# /etc/nginx/sites-available/ghost
server {
listen 80;
location ~ ^/.well-known {
root /var/www/ghost;
leotm /
Created Jul 12, 2017
Remove all traces of Let's Encrypt
rm -rf /path/to/your/git/clone/directory
rm -rf ~/.local/share/letsencrypt
rm -rf /etc/letsencrypt
rm -rf /var/log/letsencrypt
rm -rf /var/lib/letsencrypt
rm -rf ~/letsencrypt.log
rm -rf ~/.local/share/letsencrypt
leotm /
Created Mar 29, 2017
A shell script that creates an associate array and generates prefixed php files that redirect to the matching URLs
# How to iterate over associate arrays in Bash
# To generate PHP redirection files with prefixes
declare -A array
for i in "${!array[@]}"
View ew.txt
Ew, ew, ew... ew, ew...ew, ew, ew... ew-ew-ew... ew, ew... ew-ew-ew.
[Bass]... ew, ew-ew-ew... ew-ew.
Ew, ew, ew, ew-ew, ew... ew, ew, ew-ew, ew... ew, ew, ew-ew, ew... ew, ew, ew-ew, ew... ew-ew-ew...[Break].
[Drop], Ew, ew, ew, ew-ew, ew... ew, ew, ew-ew, ew... ew, ew, ew-ew, ew... ew, ew, ew-ew, ew... ew-ew-ew-
Ew, EeEeEe, ew, ew-ew, ew...-u, -u, -UuUu... ew, ew, ew-(EeEe), ew...EeEeE, u-u-ew...e-ew, ew-e, ew, ew, -u, UuUuUu, ew, ew-ew-ew-ew, ew... ew,
Ew, EeEeEe, ew-ew-ew-ew, ew... ew-E, ew-E, ew-(EeEeE), ew, EeEeE, ew-ew-ew,
E-ew, ew-e, E-E, -u, UuUuUu...ew, ew-ew-ew-ew(e)-ew...ew-ew-ew.
[Fade out]
View no-mans-sky
View sublime-colours.txt
Background: #272822; dark gray
Text/variable: #F8F8F2; white
Comment: #75715E; light gray
Tag/statement: #F92672; pink
Function: #66D9EF; blue
Value: #E6DB74; beige
CSS value: #AE81FF; purple
HTML att / CSS id: #A6E22E; green
View twitch-ape.txt
▒▒▒▒▒▄██████████▄▒▒▒▒▒ ▒▒▒▄██████████████▄▒▒▒ ▒▒██████████████████▒▒ ▒▐███▀▀▀▀▀██▀▀▀▀▀███▌▒ ▒███▒▒▌■▐▒▒▒▒▌■▐▒▒███▒ ▒▐██▄▒▀▀▀▒▒▒▒▀▀▀▒▄██▌▒ ▒▒▀████▒▄▄▒▒▄▄▒████▀▒▒ ▒▒▐███▒▒▒▀▒▒▀▒▒▒███▌▒▒ ▒▒███▒▒▒▒▒▒▒▒▒▒▒▒███▒▒ ▒▒▒██▒▒▀▀▀▀▀▀▀▀▒▒██▒▒▒ ▒▒▒▐██▄▒▒▒▒▒▒▒▒▄██▌▒▒▒
View twitch-rekt.txt
☐ Not REKT ☑ REKT ☑ REKTangle ☑ SHREKT ☑ REKT-it Ralph ☑ Total REKTall ☑ The Lord of the REKT ☑ The Usual SusREKTs ☑ North by NorthREKT ☑ REKT to the Future ☑ Once Upon a Time in the REKT ☑ The Good, the Bad, and the REKT ☑ LawREKT of Arabia ☑ Tyrannosaurus REKT ☑ eREKTile dysfunction .
You can’t perform that action at this time.