Skip to content

Instantly share code, notes, and snippets.

View angristan's full-sized avatar
:shipit:
o(≧▽≦)o

Stanislas angristan

:shipit:
o(≧▽≦)o
View GitHub Profile
@ccqpein
ccqpein / graphic_card_switch_control.sh
Last active July 3, 2023 21:11
macOS 10.14 use pmset to control graphic card switch.
# I find this https://discussions.apple.com/thread/8160651
# but it not match my 2018 version MacBook with macos 10.14
#
# On my local, gpuswitch value is
# 0 -> does not use dedicated graphics
# 1 -> use dedicated graphics
# 2 -> switch automaticly (I guess), because 2 is default value when "automatic graphics switching" selected
# in energy in preference.
# check settings depended on charger/battery
@aeris
aeris / death-letter-en.txt
Last active October 4, 2023 10:19
GDPR death letter
Dear Sir/Madam:
I am writing to you in your capacity as data protection officer for your
company. In light of recent spam received on this email address,
I am making this request for access to personal data
pursuant to Article 15 of the General Data Protection Regulation.
I am concerned that your company’s information practices may be putting my
personal information at undue risk of exposure or in fact has breached its
obligation to safeguard my personal information.
@hakasenyang
hakasenyang / index.php
Last active July 22, 2021 09:45
ssl.hakase.io source
<?php
// Tor Check : https://gist.github.com/TheRealBastiaan/889b4ec5fafd928e0de2
function IsTorExitPoint($ip=null){
$ip = ($ip) ? $ip : $_SERVER['REMOTE_ADDR'];
if (gethostbyname(ReverseIPOctets($ip).".".$_SERVER['SERVER_PORT'].".".ReverseIPOctets($_SERVER['SERVER_ADDR']).".ip-port.exitlist.torproject.org")=="127.0.0.2") {
return true;
} else {
return false;
}
}
@dimaryaz
dimaryaz / dropbox_ext4.c
Created August 15, 2018 07:28
Dropbox ext4 hack
/*
* dropbox_ext4.c
*
* Compile like this:
* gcc -shared -fPIC -ldl -o libdropbox_ext4.so dropbox_ext4.c
*
* Run Dropbox like this:
* LD_PRELOAD=./libdropbox_ext4.so ~/.dropbox-dist/dropboxd
*/
@dansup
dansup / deploy.sh
Last active July 29, 2019 20:08
Pixelfed development deployment script
cd /home/forge/pixelfed.social
git pull origin dev
composer install --no-ansi --no-interaction --no-progress --no-scripts --optimize-autoloader
echo "" | sudo -S service php7.2-fpm reload
php artisan config:cache
php artisan migrate --force
php artisan horizon:purge
php artisan horizon:terminate
@ipmb
ipmb / doh-on-mac.md
Created May 31, 2018 20:28
DNS over HTTP (DOH) on MacOS

Install

brew install dnscrypt-proxy

Configure

Edit /usr/local/etc/dnscrypt-proxy.toml as needed. I added/modified the following lines:

@nolanlawson
nolanlawson / mastodon_backup.sh
Last active December 23, 2022 21:06
Script to back up a Mastodon instance (for non-dockerized installs)
#!/usr/bin/env bash
#
# Make a backup file of a Mastodon instance. The backup file is a TGZ containing
# the Postgres dump as well as the /public/system (media) files and the
# .env.production file. For loading the dump file contents, see:
# https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Migration-guide.md
#
# Usage: ./mastodon_backup.sh my_dump_file.tgz
#
# Advanced usage: MASTODON_LIVE_DIRECTORY=/path/to/live ./mastodon_backup.sh my_dump_file.tgz
@joyeusenoelle
joyeusenoelle / Mastodon.md
Last active January 23, 2024 02:43
An increasingly less-brief introduction to Mastodon
@sahalmhasa
sahalmhasa / sublime.text
Created September 14, 2017 08:49
sublime-text-3 3143 Licence
—– BEGIN LICENSE —–
TwitterInc
200 User License
EA7E-890007
1D77F72E 390CDD93 4DCBA022 FAF60790
61AA12C0 A37081C5 D0316412 4584D136
94D7F7D4 95BC8C1C 527DA828 560BB037
D1EDDD8C AE7B379F 50C9D69D B35179EF
2FE898C4 8E4277A8 555CE714 E1FB0E43