Skip to content

Instantly share code, notes, and snippets.

Patrick Gibson pgib

Block or report user

Report or block pgib

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
pgib /
Created Nov 9, 2019
nginx startup script for Amazon Linux 2
# Provides: nginx
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: nginx initscript
# Description: nginx
pgib / Gemfile
Created Dec 14, 2018
Sign an S3 URL
View Gemfile
source ""
git_source(:github) {|repo_name| "{repo_name}" }
gem 'aws-sdk'
pgib / .zshrc
Last active Aug 29, 2015
My oh-my-zsh theme.
View .zshrc
# Path to your oh-my-zsh configuration.
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
# Example aliases

Keybase proof

I hereby claim:

  • I am pgib on github.
  • I am pgib ( on keybase.
  • I have a public key whose fingerprint is 68AE 1949 8D8A 05E4 E9B1 4654 A811 19F0 00B6 F040

To claim this, I am signing this object:

pgib / .tmux.conf
Last active Dec 2, 2017
Nice tmux copy and paste using OS X clipboard
View .tmux.conf
# =======================================================================
# vim-style copy and paste
setw -g mode-keys vi
bind ] paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-pipe "reattach-to-user-namespace pbcopy"
bind-key -t vi-copy Space rectangle-toggle
# Update default binding of `Enter` to also use copy-pipe
unbind -t vi-copy Enter
View Users.csv
Joe Smith 123456 147852
Bill Jones 987654 369852
Steve Miller 654321 852147
pgib /
Last active Aug 29, 2015
Simple Unix program to output a terminal bell (beep)

Compile with:

gcc beep.c -o beep

Or on platforms that no longer have gcc by default (e.g. FreeBSD 10):

cc beep.c -o beep

Made for tmux/screen to get your attention in a background window.

pgib / ext.rb
Created Mar 11, 2014
Optional Jekyll monkey patch to use terminal-notifier to signal a Jekyll build completion. Put in _plugins/ext.rb
View ext.rb
require 'jekyll-assets'
# optional notification for jekyll build completion
# gem install terminal-notifier
# rbenv rehash
module Jekyll
class Site
pgib /
Last active Dec 28, 2015
Testing script to test Mac OS X Mavericks code signing for Profile Manager.

Install to /Applications/

Be sure to edit the file to set the path to your code-signing certificate.

Run with:

cd /Applications/
php -c /Applications/ signing_tester.php
View .profile
export TERM="screen-256color"
if tty -s; then
if [ -z "$WINDOW" ]; then
if tmux has-session -t devops; then
echo -n "tmux found. Re-attach? [Y/n]: "
read response
case $response in
echo "Okay. Type 'tmux attach' later..."
You can’t perform that action at this time.