Skip to content

Instantly share code, notes, and snippets.

View Iristyle's full-sized avatar

Ethan J. Brown Iristyle

View GitHub Profile
@Iristyle
Iristyle / BootstrapCanary.ps1
Created August 20, 2012 20:58
Bootstrap Chrome Canary on Windows - No Worky!
$chromeExtensions = @'
{
"extensions": {
"settings": {
"fdmmgilgnpjigdojojpjoooidkmcomcm": {
"active_permissions": {
"api": [ "cookies" ],
"explicit_host": [ "http://*/*", "https://*/*" ],
"scriptable_host": [ "http://getpostman.com/*", "https://getpostman.com/*" ]
},
@Iristyle
Iristyle / C (dark) New.jpg
Created August 15, 2012 17:09
Standardized Solarized Colors
C (dark) New.jpg
@Iristyle
Iristyle / SublimeLinter (dark) - Default Colors.jpg
Created August 15, 2012 14:17
Sample color demos for TextMate Solarized theme with Sublime Linter
SublimeLinter (dark) - Default Colors.jpg
@Iristyle
Iristyle / Tail-Content.ps1
Created May 18, 2012 21:43
Powershell Tail-Content
<#
.NOTES
AUTHOR: Keith Hill, [email protected]
DATE: Jan 25, 2009
NAME: Tail-Content.ps1
LICENSE: BSD, http://en.wikipedia.org/wiki/BSD_license
Copyright (c) 2009, Keith Hill
All rights reserved.
Redistribution and use in source and binary forms, with or without
@Iristyle
Iristyle / gist:2722455
Created May 18, 2012 00:34
Powershell Nuget Bootstrap
param([string] $destination = "$(Get-Location)")
$client = New-Object System.Net.WebClient
$results = [xml]$client.DownloadString('http://packages.nuget.org/v1/FeedService.svc/Packages()?$filter=Id eq ''NuGet.CommandLine''&$orderby=Published desc&$top=1')
$path = "${Env:Temp}\nuget.zip"
$client.DownloadFile($location.feed.entry.content.src, $path)
$shellApplication = New-Object -com Shell.Application
$zipItems = $shellApplication.NameSpace($path).Items()
$extracted = "${Env:temp}\nuget"
if (!(test-path $extracted)) { [Void](New-Item $extracted -type directory) }
@Iristyle
Iristyle / gist:2501208
Created April 26, 2012 17:38
WinRM - Import module source files to remote machine
function Export-SourceModulesToSession
{
Param(
[Management.Automation.Runspaces.PSSession]
[ValidateNotNull()]
$Session,
[IO.FileInfo[]]
[ValidateNotNull()]
[ValidateScript(
@Iristyle
Iristyle / gist:2500044
Created April 26, 2012 14:44
Enabling WinRM on a domain machine with VMWare NICs
#If having problems when enabling WinRM on a domain connected machine that is running VMWare VMs, the NICs must be properly configured
#http://powertoe.wordpress.com/2009/12/28/enable-powershell-remoting-while-running-vmware-workstation-in-a-domain/
$nlm = [Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]"{DCB00C01-570F-4A9B-8D69-199FDBA5723B}"))
$nlm.getnetworkconnections() | ? { $_.getnetwork().getcategory() -eq 0 } |
% { $_.getnetwork().setcategory(1) }
@Iristyle
Iristyle / gist:2045205
Created March 15, 2012 16:43
Standard document onReady script queue
<!-- concepts from http://samsaffron.com/archive/2012/02/17/stop-paying-your-jquery-tax -->
<!-- for head -->
<script type='text/javascript'>
window.$ = (function() {
var q = [], f = function (cb) {
q.push(cb);
};
f.attachReady = function ($) {
$(function () {
$.each(q, function(i, f) {
@Iristyle
Iristyle / gist:1870431
Created February 20, 2012 18:15
WinRM alias for Microsoft.Powershell_Profile.ps1 to hide the ugliness that is starting a remote session
function Start-RemoteSession
{
param(
[parameter(Mandatory=$true)]
[string] $HostName,
[parameter(Mandatory=$true)]
[string] $UserName,
[parameter(Mandatory=$true)]
@Iristyle
Iristyle / gist:1776477
Created February 9, 2012 02:03
CloudInit.NET script for Windows Core 2008 R2 with IIS, .NET 4 and WebDeploy 2.0
#! /powershell/
Set-StrictMode -Version Latest
$log = 'c:\cloudfu.txt'
Add-Content $log -value "Initial Execution Policy: [$(Get-ExecutionPolicy)]"
Set-ExecutionPolicy Unrestricted
Add-Content $log -value "New Execution Policy: [$(Get-ExecutionPolicy)]"
Add-Content $log -value "Path variable [${env:Path}]"
Add-Content $log -value "PSModulePath variable [${env:PSModulePath}]"