Skip to content

Instantly share code, notes, and snippets.

@mikerr
mikerr / vpn.sh
Created October 16, 2017 12:06
auto setup openvpn on linux
#!/bin/bash
# OpenVPN road warrior installer for Debian, Ubuntu and CentOS
# This script will work on Debian, Ubuntu, CentOS and probably other distros
# of the same families, although no support is offered for them. It isn't
# bulletproof but it will probably work if you simply want to setup a VPN on
# your Debian/Ubuntu/CentOS box. It has been designed to be as unobtrusive and
# universal as possible.
@mikerr
mikerr / tinkeros
Created July 31, 2017 13:07
tinkerboard tinkerOS additions
sudo apt-get install libreoffice kodi pinta sonic-pi geany minetest claws-mail vlc x11vnc guvcview
[setup netflix chrome mods]
sudo apt-get install samba
[setup samba share]
@mikerr
mikerr / tshark
Last active July 29, 2017 22:05
tshark scan disconnected wifi devices
sudo iwconfig wlan0 mode monitor
sudo iwconfig wlan0 channel 1
...
sudo iwconfig wlan0 channel 6
sudo tshark -i wlan0 -f "subtype probe-req"
@mikerr
mikerr / fstab
Created May 26, 2017 21:23
Samba mount in fstab
//HP1610/2tb /mnt/smb cifs guest,uid=nobody,iocharset=utf8,noperm 0 0
@mikerr
mikerr / airprint.sh
Created December 6, 2016 12:51
Airprint server on linux...
sudo apt-get install avahi-discover avahi-daemon
sudo apt-get install cups
sudo apt-get install samba
@mikerr
mikerr / GPS tracker
Created November 22, 2016 14:36
Stream GPS to initalstate
import serial
import pynmea2
import time
from ISStreamer.Streamer import Streamer
serialStream = serial.Serial("/dev/ttyS0", 9600, timeout=0.5)
# construct a streamer instance with information to append to or create
# a bucket and an ini file location that contains the Initial State
# Account Access Key.
@mikerr
mikerr / btle-scan.py
Created November 17, 2016 14:59
Python script to output bluetooth LE MAC addresses and current RSSI (signal strength)
import sys
import os
import struct
from ctypes import (CDLL, get_errno)
from ctypes.util import find_library
from socket import (
socket,
AF_BLUETOOTH,
SOCK_RAW,
BTPROTO_HCI,
@mikerr
mikerr / hotspot
Last active October 29, 2016 15:41
Portable hotspot...
sudo apt-get install dnsmasq hostapd
echo "denyinterfaces wlan0" >/etc/dhcpcd.conf
@mikerr
mikerr / get_serials.sh
Created October 25, 2016 13:12
Get all SERIAL numbers from connected hard drives/ SD cards and flash drives....
for f in `ls -1d /dev/*` ;
do
udevadm info -n $f 2>/dev/null |grep -i serial ;
done
@mikerr
mikerr / relog.sh
Created October 19, 2016 13:48 — forked from sscarduzio/relog.sh
BtWiFi_with_FON automatic login written as a bash script. I have this running every 10 minutes on my raspberry pi
#!/bin/bash
# CONF
DBG=true
RELOG_UNAME=your@email.com
RELOG_PASSW=xxxxxxxxxxxxxxx
# END CONF