Skip to content

Instantly share code, notes, and snippets.

@rjmoggach
rjmoggach / overclock_nvidia.sh
Created November 20, 2017 15:33
overclock nvidia bash script
#!/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)"
@sbonfert
sbonfert / root-ro
Last active June 24, 2019 17:25 — forked from niun/root-ro
Read-only Root-FS with overlayfs for Raspian
#!/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.
#
@pierew
pierew / pvenode-rename
Created February 18, 2019 19:07
Changing a Proxmox VE Nodes name when it is not in a cluster
OLDNAME=$(hostname)
hostnamectl set-hostname ${1}
mkdir -p /etc/pve/nodes/${1}
cp -a /etc/pve/nodes/${OLDNAME} /etc/pve/nodes/${1}
echo 'A reboot is required, Exit with CTRL-C'
read
@gansbrest
gansbrest / gist:6983561
Last active March 13, 2023 21:49
Internal redirect to another domain with proxy_pass and Nginx
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
@Lewiscowles1986
Lewiscowles1986 / rPi3-ap-setup.sh
Last active July 16, 2023 15:33
Raspberry Pi 3 access-point-setup
#!/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
@ValdikSS
ValdikSS / huawei-e5885-backup.md
Last active October 27, 2023 18:32
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/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 November 18, 2023 17:22
Running docker-compose as a systemd service

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
@gnuton
gnuton / gist:3ba6dca3ce27d13833da
Created December 3, 2015 23:09
Python script which switch Huawey hilink e3372 to debug mode, then sends some command to its serial console.
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
@voluntas
voluntas / sysctl.conf
Created October 14, 2017 13:07 — forked from techgaun/sysctl.conf
Sysctl configuration for high performance
### 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
@pamolloy
pamolloy / README.md
Last active April 6, 2024 05:49
Mesh network using VXLAN over Wireguard