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
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
export PS1="< \w >\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " | |
# git branch in prompt | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} |
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
# Fork this file to make your customizations! For example most people don't have an Ultimate license. | |
# Add DS Package Store and Boxstarter packages | |
Set-BoxstarterConfig -NugetSources "http://choco.directs.com/nuget;http://chocolatey.org/api/v2;http://www.myget.org/F/boxstarter/api/v2" | |
choco sources add -name NuGet -source https://nuget.org/api/v2/ | |
choco sources add -name DS -source http://choco.directs.com/nuget | |
# Windows Options | |
Disable-UAC | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar |
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
git rm --cached $(git ls-files -i -c --exclude-from=.gitignore) |
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
-Dswing.aatext=true | |
-Dawt.useSystemAAFontSettings=lcd |
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
git branch -d branch_name # local | |
git push origin --delete branch_name # remote |
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
vagrant ssh-config > ssh_config | |
ssh -F ssh_config default | |
ssh -F ssh_config default /usr/local/bin/pull-updates |
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
# This was part of a larger bash script. | |
# I decided to use sed to replace a password in an XML file after prompting the person installing. | |
# Since it was XML I had to first use sed to encode for XML. | |
# Then, since I was using sed I had to encode for sed. | |
# There is some shell encoding there too because of the backticks. | |
# A lot of damn back slashes. | |
# encode for XML | |
# & => & < => < > => > " => " ' => ' | |
ENCODED_SQL_PASSWORD=`echo $SQL_PASSWORD | sed -e "s/&/\&/g" -e "s/</\</g" -e "s/>/\>/g" -e "s/\"/\"/g" -e "s/'/\'/g"` |
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
# https://code.google.com/p/solrpy/ | |
# Reference: http://pythonhosted.org/solrpy/reference.html | |
import solr | |
solrConnection = solr.SolrConnection( | |
'http://my.solr.server/solr/myCollection', http_user='basic_auth_user', http_pass='basic_auth_pass') | |
solrConnection.add(id=1, fieldName='something', multiValuedFieldName=['Foo', 'Bar']) | |
solrConnection.commit() | |
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 com.whatever; | |
import org.junit.Assert; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.junit.runners.Parameterized; | |
@RunWith(value = Parameterized.class) | |
public class MyTest { | |
private String _myParameter; |
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
// Uses: AutoMapper | |
// Install via NuGet w/ | |
// PM> Install-Package AutoMapper | |
using AutoMapper | |
public class DeepCopyableClass | |
{ | |
static DeepCopyableClass() | |
{ | |
// Do whatever fancy copy stuff you need here |