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
pgib / Gemfile
Created Dec 14, 2018
Sign an S3 URL
View Gemfile
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
gem 'aws-sdk'
@pgib
pgib / .zshrc
Last active Aug 29, 2015
My oh-my-zsh theme.
View .zshrc
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# 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.
ZSH_THEME="pgib"
# Example aliases
View keybase.md

Keybase proof

I hereby claim:

  • I am pgib on github.
  • I am pgib (https://keybase.io/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
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
pgib / README.md
Last active Aug 29, 2015
Simple Unix program to output a terminal bell (beep)
View README.md

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
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
pgib / README.md
Last active Dec 28, 2015
Testing script to test Mac OS X Mavericks code signing for Profile Manager.
View README.md

Install to /Applications/Server.app/Contents/ServerRoot/usr/share/devicemgr/backend/php

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

Run with:

cd /Applications/Server.app/Contents/ServerRoot/usr/share/devicemgr/backend/php
php -c /Applications/Server.app/Contents/ServerRoot/usr/share/devicemgr/php/php.ini 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
N*|n*)
echo "Okay. Type 'tmux attach' later..."
@pgib
pgib / tmux.conf
Created Oct 31, 2013
vim-style copy and paste for tmux
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-selection
bind-key -t vi-copy 'y' copy-pipe "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind -t vi-copy Enter
You can’t perform that action at this time.