Skip to content

Instantly share code, notes, and snippets.

View SkaTeMasTer's full-sized avatar

$hawn Reimerdes SkaTeMasTer

View GitHub Profile
@SkaTeMasTer
SkaTeMasTer / ntp.conf
Created October 12, 2016 18:10
Raspberry Pi -- ntp server config. FROM: https://frillip.com/raspberry-pi-stratum-1-ntp-server/
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
# Local
server 127.127.1.0
fudge 127.127.1.0 stratum 10
# GPS with PPS enabled
server 127.127.20.0 mode 17 minpoll 4 maxpoll 4 iburst true prefer
# GPS time
@SkaTeMasTer
SkaTeMasTer / pywallet-dump.sh
Created October 23, 2016 20:34
Getting keys from old Bitcoin-qt forks.
#!/bin/bash
echo "Enter directory with all the wallet *.dat files live:"
read walletdir
echo "Enter passphrases for all the encrypted wallets in directory:"
read passphrase
for i in $walletdir/*.dat; do
pywallet.py --dumpwallet --datadir=$walletdir --wallet=$i --passphrase=$passphrase
done
#!/bin/bash
# time stamp this shit yo
nowdate=$(date "+%d-%m-%y")
nowtime=$(date "+%H:%M:%S")
# stole this idea of using gpspipe, grep and awk from here: http://thomasloughlin.com/gpspipe-gps-client/
gpsdata=$(gpspipe -w -n 10 | grep -m 1 lon)
lat=$(echo "$gpsdata" | jsawk ‘return this.lat’)
lon=$(echo "$gpsdata" | jsawk ‘return this.lon’)
gpsspeed=$(echo "$gpsdata" | jsawk ‘return this.speed’)
# runs my modified the speedtest-cli python script and uses tr instead of grep to remove some line feeds and change it to a comma to suit the csv
#! /usr/bin/python
# Written by Dan Mandle http://dan.mandle.me September 2012
# License: GPL 2.0
import os
from gps import *
from time import *
import time
import threading
@SkaTeMasTer
SkaTeMasTer / blah.sh
Created October 26, 2016 05:34
raspberry pi PIXEL desktop mod chromium
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install -y rpi-chromium-mods
sudo apt-get install -y python-sense-emu python3-sense-emu
sudo apt-get install -y python-sense-emu-doc realvnc-vnc-viewer
@SkaTeMasTer
SkaTeMasTer / google-header-page-schema.org.txt
Created October 31, 2016 19:16
The very latest head meta tags Google
<!doctype html>
<html itemscope itemtype="http://schema.org/WebPage">
<head>
<meta charset=utf-8>
<!-- Place this data between the <head> tags of your website -->
<title>feedly. Read more, know more.</title>
<meta name="description" content="feedly: organize, read and share what matters to you." />
<link rel="mask-icon" href="//s3.feedly.com/img/feedly-icon.svg" color="#2bb24c">
@SkaTeMasTer
SkaTeMasTer / PiCamera-to-VideoTimelapse.sh
Created January 13, 2017 09:03
Python script to capture the time lapse images:
#do apt-get install ffmpeg Then, use this
import time
import picamera
VIDEO_DAYS = 1
@SkaTeMasTer
SkaTeMasTer / gist:affba7514d17b237c36253e276f89131
Created January 17, 2017 23:17
connect to best network.. he priority in this file determines to which network you will connect if more then 2 configured networks are available. This will always be the network with the highest priority. WPA start script Create the WPA startup script /etc/init.d/wpa.sh
The priority in this file determines to which network you will connect if more then 2 configured networks are available. This will always be the network with the highest priority.
WPA start script
Create the WPA startup script /etc/init.d/wpa.sh
sudo vi /etc/init.d/wpa.sh
#!/bin/bash
@SkaTeMasTer
SkaTeMasTer / top-25-ssh-commands-tricks
Created January 18, 2017 00:32
25 Best SSH Commands / Tricks
1) Copy ssh keys to user@host to enable password-less ssh logins.
ssh-copy-id user@host
To generate the keys use the command ssh-keygen
2) Start a tunnel from some machine’s port 80 to your local post 2001
ssh -N -L2001:localhost:80 somemachine
@SkaTeMasTer
SkaTeMasTer / pihole-display-lcd
Created January 18, 2017 01:13
Displays Pi-hole stats on the Adafruit PiTFT 2.8" touch screen # Set the pi user to log in automatically and run this script from /etc/profile # (c) 2015 by Jacob Salmela # This file is part of Pi-hole.
#!/usr/bin/env bash
# Displays Pi-hole stats on the Adafruit PiTFT 2.8" touch screen
# Set the pi user to log in automatically and run this script from /etc/profile
# (c) 2015 by Jacob Salmela
# This file is part of Pi-hole.
#
# Pi-hole is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.