Skip to content

Instantly share code, notes, and snippets.

@hawx
hawx / .bashrc
Last active April 26, 2017 15:57
.files
git_author() {
if [ -z "$GIT_AUTHOR_NAME" ]; then
echo "developer"
else
echo "$GIT_AUTHOR_NAME"
fi
}
export PS1='\[\033]0;$MSYSTEM:\w\007\]\n\[\033[32m\]$(git_author) @ \h \[\033[33m\]\w$(__git_ps1) \[\033[0m\]\n$ '
@joefitzgerald
joefitzgerald / Vagrantfile
Last active July 6, 2018 12:33
Windows Vagrantfile - Installs .NET 4.5, VS 2012, VS 2012 Update 3, then a bunch of utilities, then syspreps the machine. Get https://github.com/joefitzgerald/packer-windows for the base box and add it with the name "windows2008r2".
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "vagrant-windows"
config.vm.box = "windows2008r2"
# You should be using the vagrant-windows Vagrant Plugin!
# Admin user name and password
config.winrm.username = "Administrator"
@addyosmani
addyosmani / pubsub.js
Created December 5, 2012 16:04
Pub/Sub latest
/*
A basic implementation of the Publisher/Subscriber design pattern.
Developed by @addyosmani and @integralist
Example Usage:
// Create subscriber function to be called when topic publishes an event
var testSubscriber = function (topics, data) {
console.log(topics + ': ' + data);
};
@xavierdecoster
xavierdecoster / register a myget feed.markdown
Last active July 12, 2022 12:43
Store MyGet credentials in your roaming user profile NuGet.config

Execute the following script using your MyGet [feedUrl] and MyGet [username] , [password] and [apikey]. Run this from a commandline where you have access to nuget.exe (or set the path to your nuget.exe in a system environment variable).

Store credentials in machine-level nuget.config (non-transferable)

nuget setapikey [apikey] -source [feedUrl]
nuget sources add|update -Name [name] -source [feedUrl] -User [username] -pass [password]