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
# adding and committing | |
git add -A # stages All | |
git add . # stages new and modified, without deleted | |
git add -u # stages modified and deleted, without new | |
git commit --amend # Add staged changes to previous commit. Do not use if commit has been pushed. | |
git commit --amend --no-edit # Do so without having to edit the commit message. | |
# remotes - pushing, pulling, and tracking | |
git fetch # gets remote objects and refs. Needed if new branches were added on the remote. | |
git remote -v # Lists all remotes (verbose) |
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 dos2unix-recursive='find . -iname '*.tpl' | xargs dos2unix' | |
alias edit='mcedit' | |
alias del='rm' | |
alias deltree='rm -r' | |
alias dir='/bin/ls $LS_OPTIONS --format=vertical' | |
alias attrib='chmod' | |
alias chdir='cd' | |
alias copy='cp' | |
alias ls='ls -a' |
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 | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' | |
green='\033[0;32m' |
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
NeedsTimingInfo = true; | |
var start = Date.now(), | |
triggered = false, | |
prev; | |
var PluginParameters = [ | |
{ | |
name: "Window Length", | |
defaultValue: 80, |
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
private static bool DoSomething(string name) | |
{ | |
var result = false; | |
if(name == "SomeName") | |
{ | |
result = true; | |
} | |
return result; |
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
public class Comparison | |
{ | |
public void Compare() | |
{ | |
StringBuilder sb1 = new StringBuilder("Markit on Demand"); | |
StringBuilder sb2 = new StringBuilder("Markit on Demand"); | |
var compare = sb1 == sb2; | |
var equals = sb1.Equals(sb2); |
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 parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |