Skip to content

Instantly share code, notes, and snippets.

⌨️
Typing away

bricewge

⌨️
Typing away
Block or report user

Report or block bricewge

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
@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 Nov 2, 2018
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
@bricewge
bricewge / PKGBUILD
Created Jan 9, 2016
AUR platformio-git
View PKGBUILD
# Maintainer: Will Price <will.price94+aur@gmail.com>
# Contributor: Brice Waegeneire <bricewge at gmail dot com>
pkgname=platformio-git
_pkgname=platformio
pkgver=v2.1.1.r554.g3d0aad6
pkgrel=1
pkgdesc="A cross-platform code builder and library manager"
arch=('x86_64' 'i686')
url="http://platformio.com/"
@bricewge
bricewge / PKGBUILD
Created Dec 7, 2015
qemu-user-static 2.4-3
View PKGBUILD
# Maintainer: Sergio Tridente <tioduke at gmail dot com >
# Contributor: Steven Noonan <steven@uplinklabs.net>
pkgname=qemu-user-static
pkgver=2.4
pkgrel=3
pkgdesc="A generic and open source processor emulator which achieves a good emulation speed by using dynamic translation, statically linked."
arch=('i686' 'x86_64')
license=('GPL2' 'LGPL2.1')
url="http://wiki.qemu.org/Index.html"
You can’t perform that action at this time.