- http://stackoverflow.com/questions/804115 (
rebase
vsmerge
). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebase
vsmerge
) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse
) - http://stackoverflow.com/questions/292357 (
pull
vsfetch
) - http://stackoverflow.com/questions/39651 (
stash
vsbranch
) - http://stackoverflow.com/questions/8358035 (
reset
vscheckout
vsrevert
)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# MySQL database replication (MyISAM only) using syncthing(+API) | |
# version 0.2 | |
# | |
# You'll first want to set up syncthing folders for each /var/lib/mysql/x,y,z,.. mysql database you want to sync | |
# (and limit max conflicts per folder to 1 (or 0) to keep the db folders 'clean') | |
# | |
# Why? Does the job for my application; extremely easy multi-master deployment (slave too) | |
# Warning: at least 10 second 'margin of error' for potential data corruption ... use at own risk. | |
### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
THIS GIST CONTAINS TWO VERSIONS - A PHP SCRIPT, AND A PYTHON SCRIPT | |
### PHP SCRIPT ### | |
/* | |
* This script will generate a list of IP segments for selected Steam PoPs/Relays, in desired format (mikrotik, windows, cidr, list, or mask) | |
* Example use case is for CSGO matchmaking - you can use this to block all servers except the ones you want to play on | |
* | |
* Example query (assuming you are hosting this on a php-enabled web server at 192.168.0.1): | |
* http://192.168.0.1/steam-routes.php?type=mikrotik&telnet=true&allow=jhb,cpt,jnb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Expand /tmp (if tmpfs) | |
mount -o remount,size=5G /tmp/ | |
# Clone to multiple disks with progress | |
dd if=/dev/sda | pv -s $(blockdev --getsize64 /dev/sda) | tee >(dd of=/dev/sdb) | tee >(dd of=/dev/sdc) | dd of=/dev/sdd | |
# faster... and source can be image or device | |
pv /dev/sda | tee >(dd bs=64k of=/dev/sdb) >(dd bs=64k of=/dev/sdc) >(dd bs=64k of=/dev/sdd) | dd bs=64k of=/dev/sde |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ---------------------------------------------------------------------------------- | |
# Script for checking the temperature reported by the ambient temperature sensor, | |
# and if deemed too high send the raw IPMI command to enable dynamic fan control. | |
# | |
# Also get CPU temps from lm-sensors and adjust fan speeds according to defined | |
# speed % which should be set according to your needs (each CPU model will vary) | |
# | |
# Requires: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RouterOS has a limitation where you can't run UPnP on the same interface for both internal and external (in order to DST-NAT from a LAN IP to another LAN IP on same interface/subnet) | |
# This hack lets you workaround this limitation | |
# | |
# In the following example, bridge1 has IP 192.168.0.2 and is the gateway for other some clients with uPnP needs | |
# The router's default gateway upstream, is another LAN device, eg 192.168.0.1 | |
# | |
# How it works: | |
# 1. First we disable uPnP daemon | |
# 2. We define the intended internal uPnP interface as an external one for now | |
# 3. Enable uPnP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ANDROID 10 SAMSUNG IMG PACK/REPACK - UBUNTU 18.10 COSMIC | |
[BOOTLOADER UNLOCKED IS REQUIRED - FIRST UNLOCK BOOTLOADER] | |
----------------------------------------------------------- | |
/etc/apt/sources.list | |
deb http://old-releases.ubuntu.com/ubuntu/ cosmic main universe restricted multiverse | |
deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic main universe restricted multiverse | |
deb http://old-releases.ubuntu.com/ubuntu/ cosmic-security main universe restricted multiverse | |
deb-src http://old-releases.ubuntu.com/ubuntu/ cosmic-security main universe restricted multiverse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is by far not the ideal solution, but for now it will do: I put a 102 Ohm resistor across pins 2 and 7 of my VGA port (also known as the headless Mac Mini trick), and Windows 10 now believes I have a second monitor attached. | |
On a different computer I had to use pins 1 and 6 and reboot before the "monitor" would work. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In terminal: | |
sudo route -n add 192.168.2.0/24 172.31.30.1 |
OlderNewer