Skip to content

Instantly share code, notes, and snippets.

@MattSeen
MattSeen / .gitconfig
Last active April 15, 2024 06:11
These are a series of the Git alias I use on use on a daily basis. I have included references to the places where I have found each one to give the authors due credit.
[alias]
# Source: http://stackoverflow.com/questions/7066325/how-to-list-show-git-aliases#answer-7067489
# Found on stackoverflow list all available aliases ==
alias = config --get-regexp '^alias.*'
s = status
ss = status --short
ssb = status --short --branch
co = commit
@MattSeen
MattSeen / rake.sh
Last active December 29, 2015 17:29 — forked from turadg/rake.sh
A bash script for allow tab completion of rake tasks.
# bash completion for rake
#
# some code from on Jonathan Palardy's http://technotales.wordpress.com/2009/09/18/rake-completion-cache/
# and http://pastie.org/217324 found http://ragonrails.com/post/38905212/rake-bash-completion-ftw
#
# For details and discussion
# http://turadg.aleahmad.net/2011/02/bash-completion-for-rake-tasks/
#
# INSTALL
#
'''
This code snippet was found on Stack Overflow
Question: http://stackoverflow.com/questions/34079/how-to-specify-an-authenticated-proxy-for-a-python-http-connection
Answer: http://stackoverflow.com/a/34116/1367612
'''
import urllib2
TRANSFER_PROTOCOL = "https"
function clone (t) -- deep-copy a table
if type(t) ~= "table" then return t end
local meta = getmetatable(t)
local target = {}
for k, v in pairs(t) do
if type(v) == "table" then
target[k] = clone(v)
else
target[k] = v
end
<?php
/*
* Copyright 2013 Disqus, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
#!/bin/bash
#
# Purpose: manually associate missed renames in merge conflicts
#
# Usage: git merge-associate <our-target> <base> <theirs>
#
# Example: After a failed rename detection A/a -> B/b which results
# in CONFLICT (delete/modify) for A/a and corresponding "deleted by us"
# messages in git status, the following invocation can be used to manually
# establish the link: