Skip to content

Instantly share code, notes, and snippets.

Mike Behnke localpcguy

Block or report user

Report or block localpcguy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@localpcguy
localpcguy / .profile
Created Sep 27, 2019 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
View .profile
# 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
@localpcguy
localpcguy / CamelCaseMacro.velocity
Created Oct 26, 2018 — forked from Pencroff/CamelCaseMacro.velocity
Transformation file name to CamelCase in IntelliJ IDEA file templates
View CamelCaseMacro.velocity
## 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 = "" )
@localpcguy
localpcguy / .gitconfig
Last active Apr 2, 2018
Bunch of aliases for git commands, some my own, others pulled from various blog posts, stack overflow comments and other places online
View .gitconfig
[alias]
co = checkout
ci = commit
st = status
br = branch
fl = log -u
filelog = log -u
del = branch -d
delr = push origin -d
df = diff
@localpcguy
localpcguy / .block
Last active Jan 8, 2018
Add elements using .enter and .append (starting with empty selection).
View .block
license: gpl-3.0
height: 130
border: no
View 1. raw_handlebars.js
//<p class="name">hi {{name}}</p>
Handlebars.templates["hi"]=function(data) {
return "<p class=\"name\">hi "
+ escapeExpression(data['name'])
+ "</p>\n";
});
View gist:87b1ac83a06c8456edbad57ca3c57be5
{
"5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9": 10,
"6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b": 3,
"d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35": 3,
"4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e4729b49fce": 11,
"4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8a": 2,
"ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d": 2,
"e7f6c011776e8db7cd330b54174fd76f7d0216b612387a5ffcfb81e6f0919683": 3,
"19581e27de7ced00ff1ce50b2047e7a567c76b1cbaebabe5ef03f7c3017bb5b7": 2,
"4a44dc15364204a80fe80e9039455cc1608281820fe2b24f1e5233ade6af1dd5": 5,
@localpcguy
localpcguy / .block
Last active Jun 14, 2017
SVG bar chart
View .block
license: mit
@localpcguy
localpcguy / getClass.js
Created May 31, 2017
Get the class type of a JavaScript element
View getClass.js
function getClass(obj) {
if (typeof obj === 'undefined') {
return 'undefined';
}
if (obj === null) {
return 'null';
}
return Object.prototype.toString.call(obj).match(/^\[object\s(.*)\]$/)[1];
}
@localpcguy
localpcguy / p4merge4git.md
Created May 9, 2017 — forked from tony4d/p4merge4git.md
Setup p4merge as a visual diff and merge tool for git
View p4merge4git.md
@localpcguy
localpcguy / object-forin-forown.js
Created Feb 27, 2017 — forked from cowboy/object-forin-forown.js
JavaScript: Object#forIn and Object#forOwn
View object-forin-forown.js
/*
* Object#forIn, Object#forOwn
*
* Copyright (c) 2012 "Cowboy" Ben Alman
* Licensed under the MIT license.
* http://benalman.com/about/license/
*/
Object.defineProperties(Object.prototype, {
forIn: {
You can’t perform that action at this time.