Skip to content

Instantly share code, notes, and snippets.

View leotm's full-sized avatar

LeoTM leotm

View GitHub Profile
@leotm
leotm / reinstall_brew.sh
Created November 19, 2021 15:12
Re-install Brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
@leotm
leotm / registerServiceWorker.ts
Created November 19, 2021 15:09
Register a service worker
navigator.serviceWorker
.register('/sw.js')
.then((reg) => console.log('SW registered', reg))
.catch((err) => console.log('rip', err))
PODS:
- boost-for-react-native (1.63.0)
- CocoaAsyncSocket (7.6.4)
- CocoaLibEvent (1.0.0)
- DoubleConversion (1.1.6)
- FBLazyVector (0.62.2)
- FBReactNativeSpec (0.62.2):
- Folly (= 2018.10.22.00)
- RCTRequired (= 0.62.2)
- RCTTypeSafety (= 0.62.2)
@leotm
leotm / restartGhost.sh
Created September 21, 2017 13:39 — forked from hyharryhuang/restartGhost.sh
Restart Ghost Blog
sudo service nginx restart
sudo service ghost restart
@leotm
leotm / ghost
Created July 24, 2017 14:30
Original file which worked with HTTPS before went down
# /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 July 12, 2017 20:13
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
leotm / generate-php-redirections.sh
Created March 29, 2017 11:27
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
array["uk"]="https://www.google.co.uk"
array["fi"]="https://www.google.fi"
array["es"]="https://www.google.es"
for i in "${!array[@]}"
░░░░░░░░░░░█▀▀░░█░░░░░░
░░░░░░▄▀▀▀▀░░░░░█▄▄░░░░
░░░░░░█░█░░░░░░░░░░▐░░░
░░░░░░▐▐░░░░░░░░░▄░▐░░░
░░░░░░█░░░░░░░░▄▀▀░▐░░░
░░░░▄▀░░░░░░░░▐░▄▄▀░░░░
░░▄▀░░░▐░░░░░█▄▀░▐░░░░░
░░█░░░▐░░░░░░░░▄░█░░░░░
░░░█▄░░▀▄░░░░▄▀▐░█░░░░░
░░░█▐▀▀▀░▀▀▀▀░░▐░█░░░░░
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
☐ 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 .