Skip to content

Instantly share code, notes, and snippets.

View actaneon's full-sized avatar

Josh King actaneon

  • Get Satisfaction
  • San Francisco, CA
View GitHub Profile
python -c "import SimpleHTTPServer;SimpleHTTPServer.test()"
public class BaseReportPage<TModel> : BaseViewPage<TModel>, IViewBase where TModel : class
{
// ...
protected override void OnPreInit(EventArgs e)
{
if (ShowAsPdf)
{
string path = _configuration.GetPrincePath();
var prince = new Prince(path);
@actaneon
actaneon / .bash_profile
Created December 31, 2009 07:03 — forked from markembling/.bash_profile
Bash prompt with Git Info
# Function for determining current git branch (if any)
# Gracefully fails if not in a git repo and returns nothing.
__gitBranch() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo ${ref#refs/heads/}
}
# Retrieves status information for git and places into predefined variables.
__gitStatus() {
# Initialise git status variables
@actaneon
actaneon / profile.ps1
Created December 31, 2009 06:57 — forked from markembling/profile.ps1
Bash like prompt with Git Info
# My preferred prompt for Powershell.
# Displays git branch and stats when inside a git repository.
# See http://gist.github.com/180853 for gitutils.ps1.
. (Resolve-Path ~/Documents/WindowsPowershell/gitutils.ps1)
function prompt {
$path = ""
$pathbits = ([string]$pwd).split("\", [System.StringSplitOptions]::RemoveEmptyEntries)
if($pathbits.length -eq 1) {
@actaneon
actaneon / gitutils.ps1
Created December 31, 2009 06:57 — forked from markembling/gitutils.ps1
Git functions for use with profile.ps1
# Git functions
# Mark Embling (http://www.markembling.info/)
# Is the current directory a git repository/working copy?
function isCurrentDirectoryGitRepository {
if ((Test-Path ".git") -eq $TRUE) {
return $TRUE
}
# Test within parent dirs
mklink /D ".\WindowsPowershell" ".\My Dropbox\PowershellProfile"