Skip to content

Instantly share code, notes, and snippets.

View willjasen's full-sized avatar

willjasen

View GitHub Profile
@willjasen
willjasen / ubuntu-ruby-env
Last active May 28, 2016 21:02
Ubuntu Ruby Environment
#!/bin/bash
echo -n "Enter Git username: "
read git_username
echo -n "Enter Git user email: "
read git_user_email
# Update available packages and install Ruby dependencies
sudo apt-get -y update
sudo apt-get -y install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
# Install prereqs
sudo apt-get update
sudo add-apt-repository -y ppa:chris-lea/node.js
sudo apt-get install -y git curl build-essential python-software-properties python g++ make
# Install node
sudo apt-get install -y nodejs npm
# Install Meteor.JS
curl https://install.meteor.com | sh
#!/usr/bin/ruby
# Calculate the entropy of a file
@willjasen
willjasen / ubuntu-graylog2.sh
Last active May 29, 2016 01:21
Graylog2 on Ubuntu
## Sets up Graylog2 on Ubuntu
# Variables
ELASTICACHE_VERSION=0.90.10
GRAYLOG2_VERSION=0.20.6
GRAYLOG2_WEB_VERSION=0.20.6
GRAYLOG2_PORT=12900
GRAYLOG2_WEB_PORT=9000
PASSWORD=password
#!/bin/bash
echo -n "Enter Git username: "
read git_username
echo -n "Enter Git user email: "
read git_user_email
# Update available packages
sudo apt-get -y update

Keybase proof

I hereby claim:

  • I am willjasen on github.
  • I am willjasen (https://keybase.io/willjasen) on keybase.
  • I have a public key whose fingerprint is 1573 8C45 5256 7964 4184 079B 6E41 B853 F8FF 092E

To claim this, I am signing this object:

@willjasen
willjasen / plexDatabaseBackupScript.sh
Last active July 24, 2019 00:19 — forked from ssmereka/plexDatabaseBackupScript.sh
Plex Media Server database backup script.
#!/bin/bash
# Backup a Plex database.
# Author Scott Smereka
# Author willjasen
# Version 2.0
# Script Tested on:
# Ubuntu 12.04 on 2/2/2014 [ OK ]
@willjasen
willjasen / download-binrev.sh
Last active December 5, 2023 04:04
download binrev radio mp3's
#!/bin/bash
# Binary Revolution Radio - The Revolution will be Digitized
# content also available on IPFS: QmfZqvTBdQJLEefgTVF2vY6Zfi5tGv5ePHkGBhUPiFwT8S
linkroot="http://audio.textfiles.com/shows/binrev/" # available via audio.textfiles.com
rootname="binrev" # every file starts with this name
filetype=".mp3" # every file is an MP3
@willjasen
willjasen / ubuntu-22.04-image.sh
Last active May 25, 2024 01:44
set up an image of ubuntu 22.04 for me
#!/bin/sh
# Image version - v2.3
# Update the operating system
apt update; DEBIAN_FRONTEND=noninteractive apt upgrade -y;
# Install common tools
apt install curl git wget net-tools screen jq locate -y;
@willjasen
willjasen / vnc-tailscale.sh
Last active November 3, 2023 06:41
lock down screen sharing (vnc) to tailscale
#!/bin/zsh
# this script limits access to screen sharing on a macOS computer to only be accessible via Tailscale
# variables
TS_INT=$(netstat -i | grep -B1 $(/Applications/Tailscale.app/Contents/MacOS/Tailscale ip --4) | head -n1 | awk '{print $1}')
PFANCHOR=/etc/pf.anchors/vnc-tailscale
# set the pf anchor variable for the tailscale interface
grep -q -e "ts_int = \"$TS_INT\"" $PFANCHOR || \
echo "ts_int = \"$TS_INT\"" | sudo tee -a $PFANCHOR >/dev/null