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
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
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 |
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
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 |
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
{ | |
"rs485": { | |
"method" : "rtu", | |
"port" : "/dev/ttyUSB2", | |
"baudrate" : 9600, | |
"stopbits" : 1, | |
"parity" : "N", | |
"timeout" : 5 | |
}, | |
"modbus": { |
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 first example assumes two usb serial port adapters are connected to the host machine. They enumerate as ttyUSB0 and ttyUSB1. | |
We want data coming into ttyUSB0 to be piped right back out of ttyUSB1 (so our host sits as a man in the middle). | |
We want an application running on the host to be able to connect to a com port and monitor the traffic. | |
# create the fifo | |
sudo mkfifo -m 777 /tmp/fifo | |
# stream serial data on /dev/ttyUSB0 to the fifo AND a virtual com port /tmp/relay | |
sudo socat /dev/ttyUSB0,raw,echo=0 system:'sudo tee /tmp/fifo | sudo socat - "pty,raw,echo=0,link=/tmp/relay"' & |
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
# predictable enumeration based on physical port the usb serial adapter is plugged into | |
# Hardware : BCM2835 raspberry pi 3b | |
# Revision : a02082 | |
# view looking at the ports of the pi | |
# usbSerial0 usbSerial1 | |
# usbSerial2 usbSerial3 | |
KERNELS=="1-1.2", SUBSYSTEMS=="usb", SUBSYSTEM=="tty", ATTRS{devpath}=="1.2", SYMLINK+="usbSerial0", GROUP="dialout", MODE="0666" | |
KERNELS=="1-1.3", SUBSYSTEMS=="usb", SUBSYSTEM=="tty", ATTRS{devpath}=="1.3", SYMLINK+="usbSerial2", GROUP="dialout", MODE="0666" | |
KERNELS=="1-1.4", SUBSYSTEMS=="usb", SUBSYSTEM=="tty", ATTRS{devpath}=="1.4", SYMLINK+="usbSerial1", GROUP="dialout", MODE="0666" |
Suppose you opened a file in the Vim editor, made a lot of changes, and then when you tried saving those changes, you got an error that made you realize that it's a root-owned file, meaning you need to have sudo privileges to save these changes.
:w !sudo tee %
The aforementioned command will ask you for root password, and then let you save the changes.
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
sudo apt-get install python3-dev libffi-dev libssl-dev -y | |
wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tar.xz | |
tar xJf Python-3.6.3.tar.xz | |
cd Python-3.6.3 | |
./configure | |
make | |
sudo make install | |
sudo pip3 install --upgrade pip |
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
default-lease-time 86400; | |
max-lease-time 86400; | |
authoritative; | |
log-facility local7; | |
subnet 172.17.1.0 netmask 255.255.255.0{ | |
range 172.17.1.100 172.17.1.200; |
OlderNewer