Skip to content

Instantly share code, notes, and snippets.

View robert-claypool's full-sized avatar
💥
Breaking Things

Robert Claypool robert-claypool

💥
Breaking Things
View GitHub Profile
Color Group Palette Shade HEX
Red Primary 50 #ffebee
Red Primary 100 #ffcdd2
Red Primary 200 #ef9a9a
Red Primary 300 #e57373
Red Primary 400 #ef5350
Red Primary 500 #f44336
Red Primary 600 #e53935
Red Primary 700 #d32f2f
Red Primary 800 #c62828
@robert-claypool
robert-claypool / debian-fullscreen-in-hyperv.md
Created July 13, 2016 18:05
How To Make Debian Linux Fullscreen in Hyper-V
@robert-claypool
robert-claypool / disable-caps-lock.reg
Created April 19, 2016 14:16
Disable CAPS LOCK on Windows 2000, XP, Vista, 7, 8, 10
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,00,00,3a,00,00,00,00,00
@robert-claypool
robert-claypool / tmux-notes.md
Last active March 14, 2019 21:33
My tmux Notes

The default prefix binding is CTRL-B

Sessions

  • tmux new -s my_session
  • tmux detach (prefix + d)
  • tmux list-sessions
  • tmux attach -t my_session

To kill a session, use prefix + :kill-session.

@robert-claypool
robert-claypool / psql-debian-installation.md
Created March 25, 2016 19:58
Postgres/PostGIS Installation on Debian

Postgres

  1. Create the file /etc/apt/sources.list.d/pgdg.list, and add a line for the repository: deb http://apt.postgresql.org/pub/repos/apt/ YOUR_DEBIAN_VERSION_HERE-pgdg main

  2. Import the repository signing key, and update the package lists.

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
  sudo apt-key add -
sudo apt-get update 
@robert-claypool
robert-claypool / ag-vim-notes.md
Last active January 14, 2016 20:44
Notes on Ag for Vim

Notes on ag.vim

This plugin is a front for ag, A.K.A. the_silver_searcher, https://github.com/rking/ag.vim

Usage: ag [FILE-TYPE] [OPTIONS] PATTERN [PATH]

Ag searches from your current working directory if a PATH is not given.

  • Check your working directory in Vim with :pwd
  • Change your working directory with :cd [PATH]
@robert-claypool
robert-claypool / ignore-line-endings
Last active August 21, 2023 15:05
Ignore Line Endings with Git Merge
git config merge.renormalize true # prevents unnecessary merge conflicts, http://stackoverflow.com/a/12194759/23566
@robert-claypool
robert-claypool / aws-signed-url-generator.sh
Last active November 20, 2015 07:52
This script prints a signed URL for HTTP GET'ting a file from AWS CloudFront
#!/bin/bash
#================================================================
# HEADER
#================================================================
#% SYNOPSIS
#+ ${script_name} [-h] [-o[file]] input_date path
#%
#% DESCRIPTION
#% This script prints a signed URL for HTTP GET'ting a file
#% from AWS CloudFront https://sendr.example.com
@robert-claypool
robert-claypool / standard-paths.md
Created November 18, 2015 05:18
Unix/Linux Standard Filesystem Paths

Basically (and very roughly), the standard paths on Unix are:

  • /bin & /sbin for vital programs for the OS, sbin being for administrators only ;
  • /usr/bin & /usr/sbin for not vital programs, sbin being for administrators only ;
  • /var for living data for programs. It can be cache data, spool data, temporary data (unless it's in /tmp, which is wiped at every reboot), etc. ;
  • /usr/local for locally installed programs. Typically, it hosts programs that follow the standards but were not packaged for the OS, but rather installed manually by the administrator (using for example ./configure && make && make install) as well as administrator scripts ;
  • /opt for programs that are not packaged and don't follow the standards. You'd just put all the libraries there together with the program. It's often a quick & dirty solution, but it can also be used for programs that are made by yourself and for which you wish to have a specific pa
@robert-claypool
robert-claypool / web.config
Created November 13, 2015 03:28
IIS configuration for HTTP to HTTPS redirects behind an AWS Electric Load Balancer; IIS URL Rewrite must be installed.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="HTTPS rewrite behind AWS Electric Load Balancer rule" enabled="true" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions>
<add input="{HTTP_X_FORWARDED_PROTO}" pattern="^http$" ignoreCase="false" />
</conditions>