Skip to content

Instantly share code, notes, and snippets.

View deanrather's full-sized avatar

Dean Rather deanrather

View GitHub Profile
#!/bin/bash -e
# ubuntu-install-flux.sh
# installs [f.lux](https://justgetflux.com/)
# usage: wget https://gist.githubusercontent.com/deanrather/b547e486d58612c87c6a2e2a0bc876b8/raw/ubuntu-install-flux.sh -O - | sh
sudo apt-get update
apt-cache pkgnames | grep -Fx python-pip || sudo apt-get install -y python-pip
apt-cache pkgnames | grep -Fx python-gconf || sudo apt-get install -y python-gconf
apt-cache pkgnames | grep -Fx python-glade2 || sudo apt-get install -y python-glade2
apt-cache pkgnames | grep -Fx python-appindicator || sudo apt-get install -y python-appindicator
#!/bin/bash -e
# ubuntu-docker-install.sh
#
# Quick-usage:
#
# wget https://gist.githubusercontent.com/deanrather/9da36d690bd9b57c33fb3ddeb4321cc7/raw/ubuntu-docker-install.sh -O - | sh
#
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
# https://github.com/docker/compose/releases
#
@deanrather
deanrather / ErrorHandler.js
Created February 11, 2016 07:18
NodeJS Error Handler
process.on
(
'uncaughtException',
function (err)
{
var stack = err.stack;
var timeout = 1;
// print note to logger
logger.log("SERVER CRASHED!");
@deanrather
deanrather / Reference Card.html
Last active September 18, 2015 01:05
Using i3
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>i3 Reference Card</title>
<link rel="stylesheet" href="refcard_style.css" />
<style type="text/css">
* { margin: 0; padding: 0; vertical-align: middle; }
html { font-family: LinuxLibertine, Linux Libertine O, Linux Libertine, serif; font-size: 15px; /* column-count: 3; column-gap: 10px; -moz-column-count: 3; -moz-column-gap: 10px; -webkit-column-count: 3; -webkit-column-gap: 10px; */ }
body > div { display: inline-block; width: 33%; margin: 0.25%; vertical-align: top; }
@deanrather
deanrather / Using Awesome.md
Created August 27, 2015 04:01
Using Awesome

Using Awesome

  • Windows are "Tiled" by default, and you organise the tiles instead of click-dragging windows around.
  • Virtual Desktops are called Tags, there's 9 of them, and they're per-Screen.

Moving Between Windows

Win+J/K   		| Prev / Next Window (like Alt+tab)
Win+Ctrl+J/K	| Prev / Next Screen
Win+1-9 | Change to Desktop
@deanrather
deanrather / JSON-Encoding
Created July 28, 2015 09:45
JSON-encoding / decoding objects with circular references
/*
cycle.js
2015-02-25
Public Domain.
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
This code should be minified before deployment.
See http://javascript.crockford.com/jsmin.html
@deanrather
deanrather / download-vrjam-finalists.sh
Created May 19, 2015 04:18
Download VR Jam Finalists
#!/bin/bash
submissions="36283
36166
36764
36258
36346
36556
36355
36358
@deanrather
deanrather / directory-compare.bat
Created May 16, 2015 12:07
Windows Batch Script to list files contained in one folder but not another
:: directory-compare.bat
:: Lists files existing in one directory, but not the other
:: Usage: \path\to\directory-compare.bat \path\to\one-dir \path\to\other-dir
:: Don't display the commands
@ECHO OFF
REM Due to some obscure reason, batch sees :: as an attempt to access a drive named ":"
REM under some circumstances.
REM So, I'll be using the inelegant "REM" statement for comments hereforth
@deanrather
deanrather / Github Web Hosting.md
Last active March 13, 2024 19:16
Free Hosting on GitHub

Free Hosting on GitHub

This guide will take you from zero webserver knowledge, to having your own free site hosted on GitHub. The only non-free bit is registering a domain name, which can be as cheap as $5/year.

This guide uses CrazyDomains as the Registrar, FreeDNS as the DNS, and GitHub as the Webserver.


1) Domain Registration and Setup