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
leotm / XCode 10.2 React-Native Nullability Issue
Created Mar 27, 2019
Fixes XCode 10.2 React-Native Nullability Issue Pointer is missing a nullability type specifier
View XCode 10.2 React-Native Nullability Issue
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <UIKit/UIKit.h>
#import <React/RCTEventEmitter.h>
@leotm
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.

Closures

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
leotm / restartGhost.sh
Created Sep 21, 2017 — forked from hyharryhuang/restartGhost.sh
Restart Ghost Blog
View restartGhost.sh
sudo service nginx restart
sudo service ghost restart
@leotm
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;
server_name blog.netsca.pe;
location ~ ^/.well-known {
root /var/www/ghost;
}
@leotm
leotm / remove_letsencrypt_all.sh
Created Jul 12, 2017
Remove all traces of Let's Encrypt
View remove_letsencrypt_all.sh
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
leotm / generate-php-redirections.sh
Created Mar 29, 2017
A shell script that creates an associate array and generates prefixed php files that redirect to the matching URLs
View generate-php-redirections.sh
# How to iterate over associate arrays in Bash
# To generate PHP redirection files with prefixes
declare -A array
array["uk"]="https://www.google.co.uk"
array["fi"]="https://www.google.fi"
array["es"]="https://www.google.es"
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
Sublime
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
▒▒▒▒▒▄██████████▄▒▒▒▒▒ ▒▒▒▄██████████████▄▒▒▒ ▒▒██████████████████▒▒ ▒▐███▀▀▀▀▀██▀▀▀▀▀███▌▒ ▒███▒▒▌■▐▒▒▒▒▌■▐▒▒███▒ ▒▐██▄▒▀▀▀▒▒▒▒▀▀▀▒▄██▌▒ ▒▒▀████▒▄▄▒▒▄▄▒████▀▒▒ ▒▒▐███▒▒▒▀▒▒▀▒▒▒███▌▒▒ ▒▒███▒▒▒▒▒▒▒▒▒▒▒▒███▒▒ ▒▒▒██▒▒▀▀▀▀▀▀▀▀▒▒██▒▒▒ ▒▒▒▐██▄▒▒▒▒▒▒▒▒▄██▌▒▒▒
You can’t perform that action at this time.