Skip to content

Instantly share code, notes, and snippets.

💭
🐱‍🐉

Aaron Powell aaronpowell

💭
🐱‍🐉
Block or report user

Report or block aaronpowell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@justintv
justintv / .bashrc
Created Aug 17, 2009
Display git branch in bash prompt
View .bashrc
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer!
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ "
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty!
# ~/code/web:beta_directory$ git checkout master
# Switched to branch "master"
# ~/code/web:master$ git checkout beta_directory
# Switched to branch "beta_directory"
View gist:527683
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@DTrejo
DTrejo / top3stories.js
Created Jan 21, 2011
Gets top three articles from frontpage and newpage of Hacker News. Blog post on scraping: http://blog.dtrejo.com/scraping-made-easy-with-jquery-and-selectorga
View top3stories.js
// Scraping Made Easy with jQuery and SelectorGadget
// (http://blog.dtrejo.com/scraping-made-easy-with-jquery-and-selectorga)
// by David Trejo
//
// Install node.js and npm:
// http://joyeur.com/2010/12/10/installing-node-and-npm/
// Then run
// npm install jsdom jquery http-agent
// node numresults.js
//
anonymous
anonymous / killscc.ps1
Created Mar 7, 2011
Removes scc bindings from a Visual Studio solution
View killscc.ps1
param([string] $folder)
$keys = 'SccProjectName', 'SccLocalPath', 'SccProvider', 'SccAuxPath'
$extensions = '.vssscc', '.vspscc'
function killScc(){
gci $folder -recurse | Where-Object { $extensions -contains $_.Extension } | foreach {
'Deleting ' + $_.FullName
$_ | Remove-Item -force
}
@stephengodbold
stephengodbold / killscc.ps1
Last active Sep 25, 2015 — forked from jstangroome/killscc.ps1
Removes source control bindings, and optionally backs up the original files
View killscc.ps1
#requires -version 2.0
param (
[ValidateScript({$_ | Test-Path -PathType Container})]
[Parameter(Mandatory=$true)]
[string] $folder,
[switch] $backup
)
function killScc(){
gci -path $folder -i *.vssscc,*.vspscc -recurse | Remove-Item -force -verbose
@HCanber
HCanber / program.cs
Created Aug 31, 2011
Console app running an OWIN Hello World application on Kayak
View program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using Gate;
using Gate.Kayak;
using Kayak;
namespace OwinHelloWorld
@symposion
symposion / README
Created Oct 15, 2011 — forked from cyberfox/keychain.rb
Convert OS X Keychain exported entries into logins for 1Password import
View README
These two files should help you to import passwords from mac OS X keychains to 1password.
Assumptions:
1) You have some experience with scripting/are a power-user. These scripts worked for me
but they haven't been extensively tested and if they don't work, you're on your own!
Please read this whole document before starting this process. If any of it seems
incomprehensible/frightening/over your head please do not use these scripts. You will
probably do something Very Bad and I wouldn't want that.
2) You have ruby 1.9.2 installed on your machine. This comes as standard with Lion, previous
versions of OS X may have earlier versions of ruby, which *may* work, but then again, they
@jstangroome
jstangroome / OverrideAssemblyVersion.targets
Last active Sep 28, 2015
An MSBuild script that allows a C# application's assembly version information to be overridden by an MSBuild property
View OverrideAssemblyVersion.targets
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Example usage: msbuild someproject.csproj /p:AssemblyVersion=1.2.3.4 /p:AssemblyFileVersion=2.3.4.5 /p:AssemblyInformationVersion="Codename Frank" -->
<Target Name="OverrideAssemblyVersion"
BeforeTargets="CoreCompile">
<!-- CallTarget technique used to allow version properties to be set by another target -->
<CallTarget Targets="CoreOverrideAssemblyVersion"
Condition=" '$(AssemblyVersion)'!='' or '$(AssemblyFileVersion)'!='' or '$(AssemblyInformationalVersion)'!='' " />
</Target>
@KevM
KevM / Nuget.Config
Created Jan 19, 2012
Nuget configuraiton of package sources.
View Nuget.Config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
<packageSources>
<add key="myrepo" value="\\server\\share\\path" />
</packageSources>
</configuration>
@darrelmiller
darrelmiller / gist:2026145
Created Mar 13, 2012
ThroughputMessageHandler
View gist:2026145
public class ThroughputMessageHandler : DelegatingHandler
{
private readonly ILogger _logger;
private Timer _timer;
private int _count;
public ThroughputMessageHandler(ILogger logger)
{
_logger = logger;
_count = 0;
_timer = new Timer(new TimerCallback(timerCallback),null,1000,1000);
You can’t perform that action at this time.