Skip to content

Instantly share code, notes, and snippets.

View CADbloke's full-sized avatar
💭
tired

Ewen Wallace CADbloke

💭
tired
View GitHub Profile
@SirkleZero
SirkleZero / git-all.ps1
Created September 25, 2012 22:40
This powershell script will enumerate the Git projects in a parent directory, perform a fetch on each remote and then print out the status of the repo.
$global:GitAllSettings = New-Object PSObject -Property @{
FolderForegroundColor = [ConsoleColor]::Cyan
}
function git-all()
{
$s = $global:GitAllSettings
dir -r -i .git -fo | % {
pushd $_.fullname
cd ..
@PaulStovell
PaulStovell / InvoiceBuilder.cs
Created April 15, 2013 10:06
FastSpring/Xero integration
// This class takes the records from FastSpring and turns them into a Xero invoice for saving
using System;
using System.Collections.Generic;
using System.Linq;
using XeroApi.Model;
using XeroFastSpring.FastSpring;
namespace XeroFastSpring.Xero
{
@thitemple
thitemple / dev_setup.ps1
Last active March 22, 2022 05:19
A PowerShell script for installing a dev machine using Chocolatey.
function Add-Path() {
[Cmdletbinding()]
param([parameter(Mandatory=$True,ValueFromPipeline=$True,Position=0)][String[]]$AddedFolder)
# Get the current search path from the environment keys in the registry.
$OldPath=(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).Path
# See if a new folder has been supplied.
if (!$AddedFolder) {
Return 'No Folder Supplied. $ENV:PATH Unchanged'
}
# See if the new folder exists on the file system.
@hanishi
hanishi / gist:7139122
Last active May 17, 2022 00:50
PipeStream with Rx that works!
using System;
using System.IO;
using System.IO.Pipes;
using System.Reactive.Concurrency;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Security.AccessControl;
using System.Security.Principal;