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
# Taken from https://stackoverflow.com/questions/1838873/visualizing-branch-topology-in-git/34467298#34467298 | |
[alias] | |
lg = lg1 | |
lg1 = lg1-specific --all | |
lg2 = lg2-specific --all | |
lg3 = lg3-specific --all | |
lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' | |
lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' | |
lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)' |
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
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func quadratic(a, b, c float64) (d, e float64) { |
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
// Framework version | |
Console.Write(typeof(string).Assembly.ImageRuntimeVersion); | |
// C# Version | |
C:\Windows\Microsoft.NET\Framework\v4.0.30319>csc /? |
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
var t = model.GetType(); | |
var mth = t.GetMethod(action); | |
if (mth != null) | |
{ | |
try | |
{ | |
mth.Invoke(model, new object[] { }); | |
} | |
catch(AmbiguousMatchException) | |
{ |
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/bash | |
# System-wide .profile for sh(1) | |
# A portion taken from http://vvv.tobiassjosten.net/git/add-current-git-branch-to-your-bash-prompt/ | |
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
c_reset=`tput sgr0` | |
c_user=`tput setaf 2; tput bold` | |
c_path=`tput setaf 4; tput bold` | |
c_git_clean=`tput setaf 2` | |
c_git_dirty=`tput setaf 1` | |
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
/** | |
* Object/Array native objects being extended via prototype produces unexpected results when | |
* when looping through objects/arrays respectively. | |
* @author Rob MacInnis | |
* @see http://stackoverflow.com/questions/10695506/adding-function-to-object-prototype-causes-function-to-show-up-in-all-for-x-in | |
*/ | |
require('colors'); | |
// Extending a native JS object |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/* Method for validating Zip Code */ | |
/* Requires Jquery-latest and Jquery-Validation plugin (http://docs.jquery.com/Plugins/Validation) */ | |
$.validator.addMethod('client_zip_cb', | |
function(value){ | |
/* Apply validation code */ | |
return value == '99999' | |
}, | |
'Please enter 99999 for the zip code!' | |
); |
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
<html> | |
<head> | |
<title></title> | |
<script type="text/javascript" src="jquery.js"></script> | |
<script type="text/javascript" src="js/kendo.web.min.js"></script> | |
<style type="text/css"> | |
<!-- | |
.active { display: list-item; } | |
.inactive { display: none; } |