Skip to content

Instantly share code, notes, and snippets.

View git-merge-associate
#!/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:
View JenkinsDiffEventListener.php
<?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
View d_copy.lua
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
View download_file.py
'''
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"
@MattSeen
MattSeen / rake.sh
Last active Dec 29, 2015 — forked from turadg/rake.sh
A bash script for allow tab completion of rake tasks.
View rake.sh
# 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
#
@MattSeen
MattSeen / .gitconfig
Last active Nov 4, 2021
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.
View .gitconfig
[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