Skip to content

Instantly share code, notes, and snippets.

Avatar

Brice Waegeneire bricewge

View GitHub Profile
@bricewge
bricewge / icecat-tor.sh
Created Jun 3, 2020
Start IceCat proxying trough Tor
View icecat-tor.sh
profile=/tmp/profile
mkdir "$profile" && cat <<EOF > "$profile"/prefs.js
user_pref("browser.startup.homepage", "https://check.torproject.org/");
user_pref("network.proxy.socks", "localhost");
user_pref("network.proxy.socks_port", 9050);
user_pref("network.proxy.type", 1);
EOF
icecat --safe-mode --profile "$profile"
@bricewge
bricewge / herolte.org
Last active Oct 4, 2020
Customizations for Android
View herolte.org

Customizations for herolte

ROM: LineageOS for microG

Disable hardware keys

If you have root enabled on your device just do the following to remount the /system as read and write.

adb root
adb remount
@bricewge
bricewge / Org.sublime-syntax
Created May 25, 2019
Syntax for org-mode in .sublime-syntax format
View Org.sublime-syntax
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: orgmode
file_extensions:
- org
scope: text.orgmode
contexts:
main:
- match: |-
@bricewge
bricewge / Caddyfile
Created Feb 23, 2019
Deploying hugo blog with caddy
View Caddyfile
localhost:8080 {
root ./my-site
internal .repo
git {
repo https://github.com/kaushalmodi/hugo-bare-min-theme.git
path .repo
clone_args --depth 1 --recurse-submodules
pull_args --recurse-submodules
interval 3600
then hugo --source ./exampleSite --destination ../..
@bricewge
bricewge / ble-button.py
Last active Mar 10, 2021
Use iTag Bluetooth BLE tracker as a light switch with Home Assistant
View ble-button.py
from bluepy import btle
import requests
bleAddr = "ff:ff:10:05:ef:ff"
url = "http://localhost:8123/api/services/light/toggle"
lamp = "light.mylight"
hassPasswd = "password"
class LightToggleDelegate(btle.DefaultDelegate):
def __init__(self):
@bricewge
bricewge / recover-nix.sh
Last active Sep 27, 2017
Recover nixos install on Kimsufi
View recover-nix.sh
#!/usr/bin/env sh
# TODO Make the script fully ineractive
# TODO Use [Kimsufi's API](https://eu.api.kimsufi.com/) to do the current manual stuff
# Recover a NixOS install on Kimsufi servers by roll-back
# 1. On the Kimsufi dashboard change your boot to rescue (Netboot -> Rescue -> rescue64-pro -> Next -> Confirm)
# 2. Restart your server, ideally a soft reboot, otherwise do it from the dashboard
# 3. Connect to your server as root by SSH and run this script
# 4. Revert your boot option back to your HDD and restart your server
View corec_d04.sh
#!/usr/bin/env sh
export PS4='\e[37m❯ \e[0m'
host=`hostname`
port="8080"
echo "\n==== ex00 ====\n"
set -o xtrace
curl -v -c cook.txt "http://$host:$port/j04/ex00/index.php"
curl -v -b cook.txt "http://$host:$port/j04/ex00/index.php?login=sb&passwd=beeone&submit=OK"
View ft_ls-test.sh
diff -u <(LC_ALL=C ls -lR /usr/bin) <(LC_ALL=C ./ft_ls -lR /usr/bin)
touch -t 999912312459 future ls -lt
ls -l ~/ ''
ls - auteur
ls ////dev///urandom
ls -j ./
ls -- -j ./
ls INVALID Makefile TROLOLOL
ls -aR /Library/Scripts/42/munki
ls -lt /dev
View 11.fillit
..#.
..#.
..#.
..#.
....
.##.
.#..
.#..
@bricewge
bricewge / Slic3r_config_bundle.ini
Created Oct 15, 2016
Slic3r_config_bundle.ini
View Slic3r_config_bundle.ini
# generated by Slic3r 1.2.9 on Sat Oct 15 09:22:30 2016
[filament:PETG]
bed_temperature = 50
bridge_fan_speed = 100
cooling = 0
disable_fan_first_layers = 3
extrusion_multiplier = 1
fan_always_on = 0
fan_below_layer_time = 60