Skip to content

Instantly share code, notes, and snippets.

@pamolloy
pamolloy / README.md
Last active Jun 1, 2021
Mesh network using VXLAN over Wireguard
View README.md
@rjmoggach
rjmoggach / overclock_nvidia.sh
Created Nov 20, 2017
overclock nvidia bash script
View overclock_nvidia.sh
#!/usr/bin/env bash
DEFAULT_FAN=65
DEFAULT_MEM=1500
DEFAULT_GPU=150
DEFAULT_POW=200
echo "Setting up ${GPU_COUNT} GPU(s)..."
GPU_COUNT="$(nvidia-smi -L | wc -l)"
@voluntas
voluntas / sysctl.conf
Created Oct 14, 2017 — forked from techgaun/sysctl.conf
Sysctl configuration for high performance
View sysctl.conf
### KERNEL TUNING ###
# 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
ValdikSS / huawei-e5885-backup.md
Last active May 24, 2021
How to backup current firmware on Huawei E5885
View huawei-e5885-backup.md

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/autorun.sh). 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 192.168.8.1 2323
/system/busybox sh
@Luzifer
Luzifer / README.md
Last active Jun 15, 2021
Running docker-compose as a systemd service
View README.md

Running docker-compose as a systemd service

Files

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
sbonfert / root-ro
Last active Jun 24, 2019 — forked from niun/root-ro
Read-only Root-FS with overlayfs for Raspian
View root-ro
#!/bin/sh
#
# 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
Lewiscowles1986 / rPi3-ap-setup.sh
Last active Jun 14, 2021
Raspberry Pi 3 access-point-setup
View rPi3-ap-setup.sh
#!/bin/bash
#
# This version uses September 2017 august stretch image, please use this image
#
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi
@gnuton
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
url="http://192.168.8.1/api/webserver/token"
response = urllib2.urlopen(url)
xml=response.read()
token=xml[59:-23]
print "Got token %s" % token
@gansbrest
gansbrest / gist:6983561
Last active Dec 7, 2019
Internal redirect to another domain with proxy_pass and Nginx
View gist:6983561
server
{
listen 80;
server_name a.com b.com c.com;
location ~* ^/comment/(.*) {
proxy_set_header HOST shared.com;
# $1 - stores capture from the location on top
# $is_args will return ? if there are query params
# $args stores query params