Skip to content

Instantly share code, notes, and snippets.

View cmarshall's full-sized avatar

WssTeam cmarshall

View GitHub Profile
@cmarshall
cmarshall / Marley Commands
Created March 21, 2011 15:47
These are the commands to weild the WSS marley-based Blog
# Sync new posts up to the site
# in data-marley/ after committing the new posts
git push sync
@cmarshall
cmarshall / styler.xml
Created December 2, 2009 20:55
Styles for Notepad++
<?xml version="1.0" encoding="Windows-1252" ?>
<NotepadPlus>
<LexerStyles>
<LexerType name="actionscript" desc="ActionScript" ext="">
<!--
<WordsStyle name="DIRECTIVE" styleID="19" fgColor="A001D6" bgColor="363636" fontName="" fontStyle="1" fontSize="" keywordClass="instre2" />
-->
<WordsStyle name="DEFAULT" styleID="11" fgColor="FFFFFF" bgColor="363636" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="FUNCTION" styleID="20" fgColor="95004A" bgColor="363636" fontName="" fontStyle="0" fontSize="" keywordClass="type2" />
<WordsStyle name="PREPROCESSOR" styleID="9" fgColor="804000" bgColor="363636" fontName="" fontStyle="0" fontSize="" />
@cmarshall
cmarshall / Git Configs
Created November 16, 2009 16:32
Some Git Default Configs
[alias]
slog = log --oneline
flog = log --name-only --relative-date --abbrev-commit
resetdb = checkout -f resources/db_modules.php
acom = commit -a
[push]
default = matching
@cmarshall
cmarshall / gist:180279
Created September 3, 2009 12:49
Show PHP errors
error_reporting(E_ALL);
ini_set('display_errors', '1');
@cmarshall
cmarshall / gist:165184
Created August 10, 2009 13:12
Add commas to a given numeric string
//found at http://www.mredkj.com/javascript/numberFormat.html
function addCommas(nStr)
{
nStr += '';
x = nStr.split('.');
x1 = x[0];
x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
@cmarshall
cmarshall / Detecting Ctrl, Alt, Shift + Click with jQuery
Created April 27, 2009 20:25
Detects if Ctrl, Alt or Shit is pressed when click event is triggered
$(document).click(function(e) {
if(e.ctrlKey) {
console.log("Ctrl+Click");
// your code goes here...
} else if(e.altKey) {
console.log("Alt+Click");
} else if(e.shiftKey) {
console.log("Shift+Click");
}
});