This collection of utilites is used to create an automatic health check for Internet connection statistics. In its most basic form, it just logs the results to a CSV file, but it can be expanded to also create an automatically expanding graph in Excel if that is desired.
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
GOCMD=go | |
GOTEST=$(GOCMD) test | |
GOVET=$(GOCMD) vet | |
BINARY_NAME=example | |
VERSION?=0.0.0 | |
SERVICE_PORT?=3000 | |
DOCKER_REGISTRY?= #if set it should finished by / | |
EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true | |
GREEN := $(shell tput -Txterm setaf 2) |
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
# Run the last command as root | |
sudo !! | |
# Serve current directory tree at http://$HOSTNAME:8000/ | |
python -m SimpleHTTPServer | |
# Save a file you edited in vim without the needed permissions | |
:w !sudo tee % | |
# change to the previous working directory | |
cd - | |
# Runs previous command but replacing | |
^foo^bar |
When the shared files on Google Drive is downloaded, it is necessary to change the download method by the file size. The boundary of file size when the method is changed is about 40MB.
filename="### filename ###"
fileid="### file ID ###"
curl -L -o ${filename} "https://drive.google.com/uc?export=download&id=${fileid}"
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 file provides some nifty command-line tools around DD-WRT's nvram command. | |
https://www.dd-wrt.com/wiki/index.php/Hardware#NVRAM | |
USE WITH CAUTION: fiddling with nvram can wipe your settings and you may loose access to your router. | |
Hint 1: Different version of DD-WRT might use different nvram variables. Thus, be carefull when updating. | |
Hint 2: The commands listed below should be issued via a ssh-connection since the webinterface for issuing commands might time out for the longer commands. | |
Background | |
========== | |
Extracting the content of configuration variables with nvram would provide an easy way of selective backup/restore of settings. However, listing the content of the nvram via | |
nvram show |