Skip to content

Instantly share code, notes, and snippets.

View matthewmccullough's full-sized avatar

Matthew J. McCullough matthewmccullough

View GitHub Profile
@trishume
trishume / .slate
Created November 20, 2012 22:21
My Slate config
# Configs
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
config secondsBetweenRepeat 0.1
config checkDefaultsOnLoad true
config focusCheckWidthMax 3000
config keyboardLayout dvorak
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
@Shukuyen
Shukuyen / Brewfile
Last active March 3, 2022 20:37
Brewfile for quick setup of new Mac computers via brew, brew cask and mas-cli
# Requirements:
# homebrew - http://brew.sh/
# brew bundle - https://github.com/Homebrew/homebrew-bundle
# cask - https://caskroom.github.io/ (installed automatically)
# mas-cli - https://github.com/argon/mas
cask_args appdir: '/Applications'
tap 'caskroom/cask'
tap 'caskroom/versions'
brew 'bat'
@LordGaav
LordGaav / post-commit
Created June 19, 2012 11:59
Git hook that determines the author based on the email address in a SSH key. Doesn't work because Git doesn't check the config between pre-commit and commit.
#!/bin/sh
# Retrieve author information as Git sees it while commiting
AUTHORINFO=$(git var GIT_AUTHOR_IDENT) || exit 1
NAME=$(printf '%s\n' "${AUTHORINFO}" | sed -n 's/^\(.*\) <.*$/\1/p')
EMAIL=$(printf '%s\n' "${AUTHORINFO}" | sed -n 's/^.* <\(.*\)> .*$/\1/p')
printf "AUTHORINFO: %s\n" "${AUTHORINFO}"
printf "NAME: %s\n" "${NAME}"
printf "EMAIL: %s\n" "${EMAIL}"
@tcbyrd
tcbyrd / SCIM-SAML-Identities.graphql
Last active April 30, 2021 16:42
SCIM and SAML identities for all members in an Organization
# Pass the URL for an Organization into the query
# to get a list of members in a specific Organization.
# Example: { "url": "https://github.com/:organization" }
query getResource($url: URI!) {
resource(url: $url) {
... on Organization {
samlIdentityProvider {
externalIdentities(first:10) {
nodes {
scimIdentity {
@vparihar01
vparihar01 / nokogiri_libxml_homebrew_lion_installation.sh
Created June 25, 2013 07:01
How to fix: Nokogiri Incompatible library version: nokogiri.bundle requires version 11.0.0 or later, but libxml2.2.dylib provides version 10.0.0. dlopen bundle.open. Using homebrew on lion to install nokogiri and lixml
FIXME:
WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8
or
ERROR -: Incompatible library version: nokogiri.bundle requires version 11.0.0 or later, but libxml2.2.dylib provides version 10.0.0
gem uninstall nokogiri libxml-ruby
brew update
brew uninstall libxml2
@vilmibm
vilmibm / alias.yml
Last active September 30, 2020 15:54
These can be copied and pasted into ~/.config/gh/config.yml in the aliases block.
approve: pr review -a
checklist: !gh issue list -l$1 | sed "s/^/- [ ] /" > checklist.md
clone: repo clone
co: pr checkout
cowments: !gh api "repos/:owner/:repo/issues/$1/comments" | jq "map(.body)[]" | while read c; do cowsay $c; done
heart: api -H Accept:application/vnd.github.squirrel-girl-preview+json -XPOST repos/:owner/:repo/issues/$1/reactions --raw-field content=heart
igrep: !gh issue list -l$1 | grep $2
il: issue list
immigrant-justice: gist view eb5f40f9ec892f22064804af90065726
@tkarpinski
tkarpinski / github_issues_to_csv.rb
Created April 12, 2012 18:09 — forked from henare/github_issues_to_csv.rb
Exports Github issues to CSV (API v3)
require 'octokit'
require 'csv'
require 'date'
# Github credentials to access your private project
USERNAME="USER_NAME"
PASSWORD="SEKRIT"
# Project you want to export issues from
USER="REPO_OWNER"
PROJECT="REPO_NAME"
@peff
peff / git-du
Last active May 17, 2019 07:43
git-du script
#!/usr/bin/perl
#
# Generate a listing of all paths ever used in the repository, along with the
# disk space used by the path throughout the entire history. Note that sizes
# for trees are cumulative; they include the sizes of all of the paths below
# them, in addition to the tree storage itself. All sizes are in bytes, and
# reflect git's delta and zlib compression.
#
# One caveat is that this is just the _current_ on-disk size. The on-disk size
# of each object may change if git repacks and chooses different delta bases,
@matthewmccullough
matthewmccullough / gist:47267
Created January 15, 2009 05:15 — forked from halbtuerke/gist:31934
Show Git dirty status in your Unix bash prompt (symbols not compatible with CygWin)
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[1;37m\]"
LIGHT_GRAY="\[\033[0;37m\]"
COLOR_NONE="\[\e[0m\]"
-------------------------------------------------------------------------
USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005
Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5
Latest version of this file (in English) is usually at:
http://sed.sourceforge.net/sed1line.txt
http://www.pement.org/sed/sed1line.txt
This file will also available in other languages:
Chinese - http://sed.sourceforge.net/sed1line_zh-CN.html