Skip to content

Instantly share code, notes, and snippets.

View philcryer's full-sized avatar
💭
Mostly harmless

Phil Cryer philcryer

💭
Mostly harmless
View GitHub Profile
@philcryer
philcryer / installer_base.sh
Created June 7, 2017 18:14
Sample bash script to build an installer with
#!/usr/bin/env bash
# PiVPN: Trivial OpenVPN setup and configuration
# Easiest setup and mangement of OpenVPN on Raspberry Pi
# http://pivpn.io
# Heavily adapted from the pi-hole.net project and...
# https://github.com/StarshipEngineer/OpenVPN-Setup/
#
# Install with this command (from your Pi):
#
# curl -L https://install.pivpn.io | bash
@philcryer
philcryer / king.sh
Created September 28, 2012 18:57
king of the mountain - because sharing is for faceb00k
#!/bin/bash
# king of the mountain - because sharing is for faceb00k
# * networking fun for geeks in conferences and cafes
# * find other clients on the local network
# * see if they have any exposed files via http
# * use nmap to attempt to knock them offline
# - OSX or Linux supported (nmap, wget required)
# - this script derived from manual steps I used to take
@philcryer
philcryer / autostart.sh
Created August 12, 2012 17:11
An example /storage/.config/autostart.sh to do NFS mounting on boot for Raspberry Pi running OpenELEC
#! /bin/sh
(sleep 5;
mount -t nfs 192.168.1.6:/home/media/games -o rw,nolock,tcp,soft,posix,noatime,nodiratime,timeo=600,actimeo=0,nfsvers=3,async,rsize=131072,wsize=131072 /storage/games
mount -t nfs 192.168.1.6:/export/music -o rw,nolock,tcp,soft,posix,noatime,nodiratime,timeo=600,actimeo=0,nfsvers=3,async,rsize=131072,wsize=131072 /storage/music
mount -t nfs 192.168.1.6:/export/videos -o rw,nolock,tcp,soft,posix,noatime,nodiratime,timeo=600,actimeo=0,nfsvers=3,async,rsize=131072,wsize=131072 /storage/videos) &
@philcryer
philcryer / 7albums80s.md
Last active September 4, 2020 19:40
#7albums80s

#7albums80s poll

Details and rules

Richard Shaw @RichardS7370

Hi All, just a quick tweet in regards to #7albums80s poll.It’s brilliant seeing so much interest and I’m loving seeing the enthusiasm and variety of suggestions. Here’s the poll rules for anyone new to this:-

  1. I’ll send a tweet on Friday at 7pm (UK) to start the poll.
  2. Please tweet your final 7 picks back to that one so I can pick up your votes (I don’t want people’s picks to be missed)
@philcryer
philcryer / gitrc
Last active May 5, 2020 00:00
This .gitrc activates when you're in a directory that is a git repo. It tells you the branch you're on, with color handling of the bash prompt according to the branch/status. For example, the prompt would look like this: [~/foo](master) $ with (master) colored GREEN, until you've added a file to the repo, but not committed it, then it will turn …
#!/bin/bash
#
# Set your bash prompt according to the branch/status of the current git repository.
#
# One-line install:
# curl https://gist.github.com/philcryer/5066010/raw/784e1e4c9df5289fe6f922fb6d122461d374758c/gitrc -o ~/.gitrc; echo "source ~/.gitrc" >> ~/.profile; source ~/.profile
#
# Originally forked from http://gist.github.com/31934 then modified liberally.
#
@philcryer
philcryer / grabby.sh
Created April 10, 2012 15:56
a bash script to perform batch downloads of Internet Archive (archive.org) materials, via record ids as listed in todo.txt
!/bin/bash
#
################################################################################
#
# File : grabby.sh
# Usage : ./grabby.sh
# Author : phil.cryer@mobot.org
# Date created : 2009-10-10
# Last updated : 2012-04-10
# Source : http://code.google.com/p/bhl-bits/utilities/grabby
@philcryer
philcryer / lynis_autorunner.sh
Last active September 15, 2019 04:23
Download and run a Lynis audit scan on your system with this shell script.
#!/bin/sh
# This script will automatically:
# * download [Lynis](https://cisofy.com/lynis/), an open source security auditing tool
# * run a full audit check, either privileged, or non-privileged if not logged in as root
# * cleanup by removing the downloaded archive, and the extracted directory it ran out of
# * save the audit report to your local directory (YYYYMMDD-lynis-report)
#
# This script requires:
# * awk
@philcryer
philcryer / mogwai.txt
Last active April 9, 2019 01:27
My workup of an old MySpace-era music related questionnaire. Thanks Erin!
1. Choose a band/artist that nobody else has chosen yet: MOGWAI
2. Answer ONLY using titles of their songs.
3. Are you male or female: Simon Ferocious
4. Describe yourself: I Am Not Batman
5. How do some people feel about you: Friend of the Night
@philcryer
philcryer / install-tidalcycles.sh
Last active March 31, 2019 00:11
Install [Titdalcycles](https://tidalcycles.org/) (and required components, Supercollider, sc3-plugins, vim-tidal, extra-samples, from source) on Debian Linux-based distros (Debian, Ubuntu, Mint, etc) including options to run the server headless.
#!/usr/bin/env bash
set -e
echo ">>> Starting..."
rm -rf /tmp/sc3-plugins /tmp/supercollider/ tc/ ~/.vim/vim-tidal
if [ ! -d "tc" ]; then
mkdir tc;
fi
cd tc
@philcryer
philcryer / Makefile
Created January 23, 2019 15:15
Makefile boilerplate example
all: say_hello generate
say_hello:
@echo "Hello World"
generate:
@echo "Creating empty text files..."
touch file-{1..10}.txt
clean: