- Download the perforce visual tool suite from here: http://www.perforce.com/perforce/downloads/index.html
- Copy only the p4merge.app file into your /Applications/ directory
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
// These hashes are for algorithmic use cases, such as bucketing in hashtables, where security isn't | |
// needed and 32 or 64 bits is enough (that is, rare collisions are acceptable). These are way simpler | |
// than sha1 (and all its deps) or similar, and with a short, clean (base 36 alphanumeric) result. | |
// A simple, *insecure* 32-bit hash that's short, fast, and has no dependencies. | |
// Output is always 7 characters. | |
// Loosely based on the Java version; see | |
// https://stackoverflow.com/questions/6122571/simple-non-secure-hash-function-for-javascript | |
const simpleHash = str => { | |
let hash = 0; |
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
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env | |
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced | |
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start | |
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running. | |
# Add the following to your shell init to set up gpg-agent automatically for every shell | |
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then | |
source ~/.gnupg/.gpg-agent-info | |
export GPG_AGENT_INFO | |
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
## file name transformation | |
## file-name => FileName | |
## Sources: | |
## http://stackoverflow.com/questions/6998412/velocity-string-function | |
## http://stackoverflow.com/questions/21288687/using-velocity-split-to-split-a-string-into-an-array-doesnt-seem-to-work | |
## http://velocity.apache.org/engine/releases/velocity-1.7/apidocs/org/apache/velocity/util/StringUtils.html#split(java.lang.String, java.lang.String) | |
#set( $CamelCaseName = "" ) | |
#set( $part = "" ) |
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
[alias] | |
co = checkout | |
ci = commit | |
st = status | |
br = branch | |
fl = log -u | |
filelog = log -u | |
del = branch -d | |
delr = push origin -d | |
df = diff |
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
license: gpl-3.0 | |
height: 130 | |
border: no |
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
//<p class="name">hi {{name}}</p> | |
Handlebars.templates["hi"]=function(data) { | |
return "<p class=\"name\">hi " | |
+ escapeExpression(data['name']) | |
+ "</p>\n"; | |
}); |
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
{ | |
"5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9": 10, | |
"6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b": 3, | |
"d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35": 3, | |
"4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e4729b49fce": 11, | |
"4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8a": 2, | |
"ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d": 2, | |
"e7f6c011776e8db7cd330b54174fd76f7d0216b612387a5ffcfb81e6f0919683": 3, | |
"19581e27de7ced00ff1ce50b2047e7a567c76b1cbaebabe5ef03f7c3017bb5b7": 2, | |
"4a44dc15364204a80fe80e9039455cc1608281820fe2b24f1e5233ade6af1dd5": 5, |
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
license: mit |
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
function getClass(obj) { | |
if (typeof obj === 'undefined') { | |
return 'undefined'; | |
} | |
if (obj === null) { | |
return 'null'; | |
} | |
return Object.prototype.toString.call(obj).match(/^\[object\s(.*)\]$/)[1]; | |
} |
NewerOlder