Skip to content

Instantly share code, notes, and snippets.

@tedliou
tedliou / sources.list
Created July 21, 2020 14:02 — forked from ishad0w/sources.list
Ubuntu 20.04 LTS (Focal Fossa) -- Full sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
#Stop Mastodon Service
systemctl stop mastodon-{web,sidekiq,streaming}.service
#Enter Mastodon User
sudo su - mastodon
#Update Ruby
cd ~/.rbenv
git pull
cd ~/.rbenv/plugins/ruby-build
git pull
@tedliou
tedliou / fbclid-nginx.conf
Created July 6, 2019 17:07 — forked from lynt-smitka/fbclid-nginx.conf
Remove fbclid argument from the URL in Nginx
http {
...
# redirect map in http block - remove fbclid argument from the end
map $request_uri $redirect_fbclid {
"~^(.*?)([?&]fbclid=[a-zA-Z0-9_-]+)$" $1;
}
...
@tedliou
tedliou / fbclid.htaccess
Created July 6, 2019 16:40 — forked from lynt-smitka/fbclid.htaccess
Remove fbclid argument from the URL in .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.*?)(&?fbclid=[a-zA-Z0-9_-]+)$
RewriteRule ^(.*)$ /$1?%1 [L,NE,R=301]
</IfModule>
@tedliou
tedliou / hosts
Created September 9, 2018 05:54 — forked from consti/hosts
/etc/hosts to block shock sites etc.
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost>
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
255.255.255.255 broadcasthost
::1 localhost