Skip to content

Instantly share code, notes, and snippets.

@tmcolby
tmcolby / enable-wifi-raspberrypi.md
Last active May 16, 2019 16:28
enable wifi connection on raspberry pi

To enable wifi connection (assuming dhcp), enter the following commands from a shell prompt..
cd /etc/wpa_supplicant
wpa_passphrase <some ssid> <some ssid psk> | sudo tee -a wpa_supplicant.conf
echo "country=<some country code - ie: US>" | sudo tee -a wpa_supplicant.conf
sudo wpa_cli -i <your wireless interface - ie: wlan0> reconfigure
Now you can check to see if you get connected...
ifconfig

@tmcolby
tmcolby / config.json
Created May 7, 2019 16:54
using json configuration file for python
{
"rs485": {
"method" : "rtu",
"port" : "/dev/ttyUSB2",
"baudrate" : 9600,
"stopbits" : 1,
"parity" : "N",
"timeout" : 5
},
"modbus": {
@tmcolby
tmcolby / pacman.commands
Created April 26, 2019 14:35
arch linux pacman commands
To update the system
sudo pacman -Syu
Update the database:
sudo pacman -Syy
Installing
To install a package (always run pacman -Syu, before installing):
sudo pacman -S package_name
@tmcolby
tmcolby / config.yml
Last active April 5, 2019 15:15
using yaml configuration file for python
database:
username: admin
password: foobar # TODO get prod passwords out of config
socket: /var/tmp/database.sock
options: {use_utf8: true}
memcached:
host: 10.0.0.99
workers:
- host: 10.0.0.101
port: 2301