Skip to content

Instantly share code, notes, and snippets.

pamolloy /
Last active Jun 1, 2021
Mesh network using VXLAN over Wireguard
rjmoggach /
Created Nov 20, 2017
overclock nvidia bash script
#!/usr/bin/env bash
echo "Setting up ${GPU_COUNT} GPU(s)..."
GPU_COUNT="$(nvidia-smi -L | wc -l)"
voluntas / sysctl.conf
Created Oct 14, 2017 — forked from techgaun/sysctl.conf
Sysctl configuration for high performance
View sysctl.conf
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
ValdikSS /
Last active May 24, 2021
How to backup current firmware on Huawei E5885

Huawei E5885 current firmware backup manual.

  1. Download modified usbloader, which will copy proper busybox into /system/busybox and enable telnetd on your device (will add additional line into /system/ Use it only on E5885, not on other device!
  2. Load it using balong-usbdload. Refer to this disassembling manual.
  3. After loading, wait about one minute, disconnect device from the computer and power off the device holding power button for ~15 seconds.
  4. Insert MicroSD card to the device and power it on.
  5. telnet 2323
/system/busybox sh
Luzifer /
Last active Jun 15, 2021
Running docker-compose as a systemd service

Running docker-compose as a systemd service


File Purpose
/etc/compose/docker-compose.yml Compose file describing what to deploy
/etc/systemd/system/docker-compose-reload.service Executing unit to trigger reload on docker-compose.service
/etc/systemd/system/docker-compose-reload.timer Timer unit to plan the reloads
/etc/systemd/system/docker-compose.service Service unit to start and manage docker compose
sbonfert / root-ro
Last active Jun 24, 2019 — forked from niun/root-ro
Read-only Root-FS with overlayfs for Raspian
View root-ro
# Read-only Root-FS for Raspian
# Modified 2016 by Stefan Bonfert to make it compatible with Raspbian
# Jessie (vanilla).
# Modified 2015 by Pascal Rosin to work on raspian-ua-netinst with
# overlayfs integrated in Linux Kernel >= 3.18.
Lewiscowles1986 /
Last active Jun 14, 2021
Raspberry Pi 3 access-point-setup
# This version uses September 2017 august stretch image, please use this image
if [ "$EUID" -ne 0 ]
then echo "Must be root"
gnuton / gist:3ba6dca3ce27d13833da
Created Dec 3, 2015
Python script which switch Huawey hilink e3372 to debug mode, then sends some command to its serial console.
View gist:3ba6dca3ce27d13833da
import urllib2
# retrieve token
response = urllib2.urlopen(url)
print "Got token %s" % token
gansbrest / gist:6983561
Last active Dec 7, 2019
Internal redirect to another domain with proxy_pass and Nginx
View gist:6983561
listen 80;
location ~* ^/comment/(.*) {
proxy_set_header HOST;
# $1 - stores capture from the location on top
# $is_args will return ? if there are query params
# $args stores query params