Skip to content

Instantly share code, notes, and snippets.

@knunery
knunery / tools
Created October 5, 2012 16:21
PowerShell script to find all of the Nuget packages being used in the source code
# PowerShell script to find all of the Nuget packages being used in the source code
# get all packages.config files
$files = ls -Filter packages.config -Recurse
# create an empty array in powershell
$packages = @()
# get the name of the packages in each file
foreach($file in $files)
@knunery
knunery / gist:6487674
Created September 8, 2013 19:27
Powershell script I use to make all the images needed for IOS and Windows App development.
# Create-Icons "C:\dropbox\projects\super8bitme\assets\super-8bit-me-art.png" "C:\temp" "windows"
Function Create-Icons
{
param($sourceFile, $targeLocation, $platform = "ios")
#$targetFile = Join-Path -path "C:\Temp" -ChildPath iTunesArtwork.png
#convert $sourceFile -resize 512x512 $targetFile
if ($platform -eq "ios")
{
@knunery
knunery / Net4Collection.cs
Last active January 2, 2016 11:09
Net4Collection
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Linq;
using NHibernate;
using NHibernate.Collection;
using NHibernate.DebugHelpers;
using NHibernate.Engine;
@knunery
knunery / blogger timezones
Last active August 29, 2015 13:57
295 time zones
<div>
<div value="Pacific/Midway" class="GFPUSQ2NGB" role="option" id="gwt-uid-1733">(GMT-11:00) Midway</div>
<div value="Pacific/Niue" class="GFPUSQ2NGB" role="option" id="gwt-uid-1734">(GMT-11:00) Niue</div>
<div value="Pacific/Pago_Pago" class="GFPUSQ2NGB" role="option" id="gwt-uid-1735">(GMT-11:00) Pago Pago</div>
<div value="Pacific/Honolulu" class="GFPUSQ2NGB" role="option" id="gwt-uid-1736">(GMT-10:00) Hawaii Time</div>
<div value="Pacific/Rarotonga" class="GFPUSQ2NGB" role="option" id="gwt-uid-1737">(GMT-10:00) Rarotonga</div>
<div value="Pacific/Tahiti" class="GFPUSQ2NGB" role="option" id="gwt-uid-1738">(GMT-10:00) Tahiti</div>
<div value="Pacific/Marquesas" class="GFPUSQ2NGB" role="option" id="gwt-uid-1739">(GMT-09:30) Marquesas</div>
<div value="America/Anchorage" class="GFPUSQ2NGB" role="option" id="gwt-uid-1740">(GMT-09:00) Alaska Time</div>
<div value="Pacific/Gambier" class="GFPUSQ2NGB" role="option" id="gwt-uid-1741">(GMT-09:00) Gambier</div>
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
public class Program
{
public static void Main()
{
foreach (TimeZoneInfo timeZone in TimeZoneInfo.GetSystemTimeZones()){
@knunery
knunery / paracomp.fsx
Created November 14, 2015 16:55 — forked from cloudRoutine/paracomp.fsx
Heterogeneous Parallel Async Composition Operator
(*
Heterogeneous Parallel Async Composition Operator
- an evolution of http://jackfoxy.com/transparent-heterogeneous-parallel-async-with-fsharp/
*)
type 'T Parallel =
private {
Compute : obj Async []
Unpack : obj [] -> int -> 'T
}
choco install 7zip