Skip to content

Instantly share code, notes, and snippets.

View deanrather's full-sized avatar

Dean Rather deanrather

View GitHub Profile
@deanrather
deanrather / newtags.sh
Last active August 29, 2015 14:15
loop over new tags in a git repo
#!/bin/bash
# newtags.sh
# does a fetch, then loops over new tags
# get original list of tags
before_list="$(git tag)"
# fetch new tags, get new list of tags
git fetch --tags
after_list="$(git tag)"
@deanrather
deanrather / usb-dev-env.md
Last active December 22, 2016 13:20
Creating a USB Ubuntu Dev Environment

Goal

A USB stick which can be booted to, which has ubuntu desktop on it

Method

Use 2 USB's, one as the installer, and one as the OS.

1) Create an Ubuntu Boot USB the normal way (I used lubuntu 12.10 x64)
@deanrather
deanrather / Enabling Login via Keys.md
Last active August 29, 2015 14:07
Enabling Login via Keys

Enabling Login via Keys

On your Workstation

Replace user with the remote username, and 1.2.3.4 with the ip or hostname of the remote

pubkey="$(cat ~/.ssh/id_rsa.pub)" && ssh user@1.2.3.4 "echo $pubkey >> /home/user/.ssh/authorized_keys"

Back on your Workstation

@deanrather
deanrather / Using Expect.md
Last active August 29, 2015 14:07
Using Expect

Using Expect

expect is a program designed to interact with other programs.

Installation

sudo apt-get install expect

Usage

@deanrather
deanrather / gconf.xml
Last active August 29, 2015 14:06
Gnome-Terminal Configuration
<?xml version="1.0"?>
<gconf>
<entry name="bold_color_same_as_fg" mtime="1410309937" type="bool" value="true"/>
<entry name="use_theme_colors" mtime="1411697226" type="bool" value="false"/>
<entry name="scrollback_unlimited" mtime="1411697226" type="bool" value="true"/>
<entry name="background_darkness" mtime="1411697226" type="float" value="0.69462400674819946"/>
<entry name="background_type" mtime="1411697226" type="string">
<stringvalue>transparent</stringvalue>
</entry>
<entry name="palette" mtime="1410309973" type="string">
@deanrather
deanrather / Bash Comparison Operators.md
Last active March 20, 2023 02:21
Bash Comparison Operators

Bash Comparison Operators

Integer Comparison

Operator   Description                      Example
-eq        Is Equal To                      [ 100 -eq 100 ]
-ne        Is Not Equal To                  [ 100 -ne 200 ]
-gt        Is Greater Than                  [ 200 -gt 100 ]
-ge        Is Greater Than Or Equal To      [ 100 -ge 100 ]
-lt        Is Less Than                     [ 100 -lt 200 ]

-le Is Less Than Or Equal To [ 100 -le 100 ]

@deanrather
deanrather / minecraft-setup.md
Last active August 29, 2015 14:06
Setting up a Minecraft Server with Amazon Web Services

Setting up a Minecraft Server with Amazon Web Services

Creating the Instance

  • Login to https://console.aws.amazon.com/ec2/
  • Change to your availablility zone (top-right dropdown)
  • Create a new m3.medium Instance
  • Make sure to open port 25565 on TCP and UDP
  • Create & Save a private key
  • Note the IP address
@deanrather
deanrather / chiptunes.md
Last active April 28, 2016 02:11
Chiptunes

Chiptunes

This is music that I like. You might like it too. It's mostly chiptunes, with a bit of VGM. It's almost all single click-and-play. This page can be accessed from: http://git.io/chiptunes

Listen

Sound Cloud

#!/bin/bash
# Changes your machine's hostname
# Usage: bash <(wget -O - http://git.io/Kbt8oQ) MY_HOSTNAME
#
old=$(hostname)
new=$1
# Backup old hosts file
date=$(date +%F_%T | sed 's/:/-/g')
@deanrather
deanrather / Usage.md
Last active August 29, 2015 14:05
PHP Goole Drive Integration

Setup

  1. Create a new spreadsheet at http://docs.google.com
  2. The spreadsheet's name should match setSpreadsheet() variable File → Rename…
  3. The spreadsheet's tab should match the setWorksheet() variable
  4. The first row of the spreadsheet should contain headers matching your add() array keys
A B