Skip to content

Instantly share code, notes, and snippets.

View itsananderson's full-sized avatar

Will Anderson itsananderson

View GitHub Profile
@itsananderson
itsananderson / package-project1-error.txt
Last active August 29, 2015 13:56
Pass Dynamic Flags to NuGet With PowerShell Splatting
nuget : Unknown option: '-Build:True'
At line:1 char:38
+ nuget pack $project $nugetArgs
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Unknown option: '-Build:True':String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
@itsananderson
itsananderson / place-kitten.ps1
Last active August 29, 2015 13:57
Fetch placeholder images from placekitten.com
# Usage:
# place-kitten.ps1 [-OutputDirectory <directory>] [resolution [...]]
#
# Examples
# place-kitten.ps1 400/300 1200/900 1920/1080
# place-kitten.ps1 -OutputDirectory c:\kitty 400/300 1200/900
Param(
[string]$OutputDirectory=$(pwd),
[string]$DimensionFile="",
@itsananderson
itsananderson / README.md
Last active August 29, 2015 13:58
Shows repo counts in GitHub repository list

Installation & Usage

  • Copy the text in bookmark.js
  • In your browser, create a new bookmark and paste the copied text into the "URL" field of the bookmark.
  • Navigate to a GitHub user/organization repository list and click on your newly created bookmark
  • Repository counts will appear under the various repository filters
  • UDATE 4/11/14: Now gives valid counts on front page
@itsananderson
itsananderson / console.xml
Created April 4, 2014 21:08
My Console2 configuration
<?xml version="1.0"?>
<settings>
<console change_refresh="10" refresh="100" rows="25" columns="80" buffer_rows="500" buffer_columns="0" shell="&quot;C:\Program Files (x86)\Git\bin\sh.exe&quot; --login -i" init_dir="%HOMEDRIVE%%HOMEPATH%" start_hidden="0" save_size="0">
<colors>
<color id="0" r="0" g="0" b="0"/>
<color id="1" r="0" g="0" b="128"/>
<color id="2" r="0" g="150" b="0"/>
<color id="3" r="0" g="150" b="150"/>
<color id="4" r="170" g="25" b="25"/>
<color id="5" r="128" g="0" b="128"/>
@itsananderson
itsananderson / github-alias.sh
Last active August 29, 2015 13:58
Add a "git hub" alias that clones from a username/repo argument
# Usage:
#
# git hub itsananderson/web-server
# git hub itsananderson/web-server other-folder
#
# Let me know if there's a better way of doing this
# http://twitter.com/itsananderson
git config --global alias.hub \!"sh -c 'git clone git@github.com:\$1.git \${@:2}' -"
@itsananderson
itsananderson / bash-path-to-win-path.sh
Created April 22, 2014 16:36
Convert Bash Shell path to Windows path
!#/bin/sh
kdiff_win_path=`echo $kdiffpath | sed -e 's/\//\\\\/g' | sed -e 's/^\\\\c/c\:/' | sed -e 's/ /\\ /g'`
javascript: (function() {
if ($('.more-repos-link').length != 0) {
$.get('/dashboard/ajax_your_repos', function(response) {
$('#repo_listing').html(response);
$('.more-repos').remove();
repoCount();
}, 'text');
} else {
repoCount();
}
@itsananderson
itsananderson / atom.bat
Created May 11, 2014 16:40
Better startup file for Atom
@echo off
SET DIR=%~dp0%
start %DIR%..\lib\atom.0.0.0.1\tools\atom.exe %*
@itsananderson
itsananderson / feed-response.txt
Last active August 29, 2015 14:01
Error in "kpm restore"
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<feed xml:base="https://my-feed.cloudapp.net/api/v2/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">
<title type="text">FindPackagesById</title>
<id>https://my-feed.cloudapp.net/api/v2/FindPackagesById</id>
<updated>2014-05-13T14:55:03Z</updated>
<author>
<name />
</author>
<link rel="self" title="FindPackagesById" href="FindPackagesById" />
</feed>
var http = require('http');
var responseHandler = function(response) {
if (response.headers.location) {
http.get(response.headers.location, responseHandler);
// If I leave this off, the node process takes ~45 seconds to exit.
// Presumably it's waiting for a listener to attach to the stream
response.on('data', function() {});
} else {