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
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
alias ls='ls -GFh' |
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
/* A simple sketch to detect a secret knock using a piezo transducer | |
copied from | |
https://programmingelectronics.com/how-to-make-a-secret-knock-detector-to-trigger-anything-with-only-an-arduino-and-a-few-cheap-components/ | |
to be combined with solenoid control circuit | |
https://core-electronics.com.au/tutorials/solenoid-control-with-arduino.html | |
Created JUL 2015 by | |
Michael James |
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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: 'stable', |
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
#!/usr/bin/env python3 | |
""" | |
Quickly send email from the command line with gmail. | |
https://bbengfort.github.io/snippets/2017/04/17/gmail-notifications-python.html | |
use: | |
notify.py -r jdoe@example.com -s "computation complete" results.csv | |
""" |
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
--style=kr --indent=tab=4 --min-conditional-indent=0 --max-instatement-indent=80 --indent-switches --indent-cases --indent-namespaces --indent-preproc-block --indent-preproc-define --indent-col1-comments --break-blocks=all --pad-oper --pad-paren-in --unpad-paren --add-one-line-brackets --mode=c |
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
# git bash autocompletion (for branch names, etc.) | |
# | |
# https://apple.stackexchange.com/a/243276/199115 | |
# | |
# installation instructions: | |
# | |
# 1. | |
# run command: |
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
for i in *.avi; do ffmpeg -i "$i" "${i%.*}.mp4"; done |
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
vector<string> ofApp::getLocalIPs() | |
{ | |
vector<string> result; | |
#ifdef TARGET_WIN32 | |
string commandResult = ofSystem("ipconfig"); | |
//ofLogVerbose() << commandResult; | |
for (int pos = 0; pos >= 0; ) |
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
1. setup interfaces: | |
sudo nano /etc/network/interfaces.d/bat0 | |
auto bat0 | |
iface bat0 inet auto | |
address 172.27.0.1 | |
netmask 255.255.255.0 | |
pre-up /usr/sbin/batctl if add wlan1 |
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
# tested on Raspberry Pi 3B+ with Raspbian Stretch 2018 | |
############ SETTINGS: | |
# the wlan interface batman should use, probably wlan0 or wlan1 | |
WLAN="wlan0" | |
# static ip, adjust as needed | |
BATMAN_IP="172.27.0.1" |