This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (window.history && history.replaceState && (location.search.match(/utm_/) || location.hash.match(/utm_/))) { | |
search = location.search.replace(/(\?|\&)?utm_[a-z]+=[^\&]+/g, '') | |
hash = location.hash.replace(/(#|\&)?utm_[a-z]+=[^\&]+/g, '') | |
history.replaceState({}, '', location.pathname + search + hash); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git config --global alias.branch-hof '!git for-each-ref --shell --format="printf '\''%%30s %%40s %%25s\n'\'' %(authorname) %(refname:short) %(committerdate:relative)" --sort=committerdate refs/remotes/origin | sh' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# /etc/ppp/ip-up example script | |
# must have 0755 permissions | |
# must be owned by root | |
/sbin/route add -net 192.168.50 -interface $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstddef> | |
#include <iostream> | |
#define array_length(a) sizeof(implementation::array_length_requires_array_argument(a)) | |
namespace implementation { | |
template<typename T, size_t N> | |
char (&array_length_requires_array_argument(T (&)[N]))[N]; | |
} // namespace implementation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo updating svn repositories | |
find . -type d -exec test -d '{}'/.svn.disabled \; -prune -o -exec test -d '{}'/.svn \; -prune -exec sh -c "echo updating {} && svn cleanup {} && svn update --non-interactive --trust-server-cert {}" \; | |
echo updating git repositories | |
find . -type d -exec test -d '{}'/.git \; -prune -exec sh -c "echo updating {} && cd {} && git clean -xdf && git pull" \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if exists("+relativenumber") | |
set relativenumber " show relative line numbers | |
set numberwidth=3 " narrow number column | |
" cycles between relative / absolute / no numbering | |
function! RelativeNumberToggle() | |
if (&relativenumber == 1) | |
set number number? | |
elseif (&number == 1) | |
set nonumber number? | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <core/Preprocessor.h> | |
namespace core { | |
namespace types { | |
/** | |
* Anonymous class, to be used instead of <code>0</code> or <code>NULL</code>. | |
* Enables the selection of the correct form when methods are overloaded for | |
* both pointers & integrals types. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'inifile' | |
require 'net/https' | |
require 'json' | |
local_repositories = [] | |
Dir['_all/**/.git/config'].each do |f| | |
config = IniFile.load(f) | |
url = config['remote "origin"']['url'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Gregory Pakosz | |
email = redacted | |
[color] | |
ui = auto | |
[core] | |
autocrlf = false | |
excludesfile = /Users/gregory/.gitignore | |
editor = vim | |
whitespace = cr-at-eol |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER < 1800) | |
#define SIZET_FMT "%Iu" | |
#elif defined(__linux__) || (defined(_MSC_VER) && (_MSC_VER >= 1800)) | |
#define SIZET_FMT "%zu" | |
#elif defined(__APPLE__) | |
#define SIZET_FMT "%zu" | |
#else | |
#define SIZET_FMT "%u" | |
#endif |
OlderNewer