Skip to content

Instantly share code, notes, and snippets.

View espoelstra's full-sized avatar

Ethan Spoelstra espoelstra

View GitHub Profile

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
  • https://*.github.com/*
  • https://*.github.io
@espoelstra
espoelstra / README.md
Last active April 2, 2019 16:00 — forked from fkorotkov/nanka.xml
Use the xml to enabled nested virtualization with the Anka command line installation instructions like `sudo installer -applyChoiceChangesXML nanka.xml -pkg AnkaBuild-1.4.3.104.pkg -target /`

README

Save this XML somewhere like $HOME/Downloads alongside the Anka .pkg file. Install/reinstall using this xml to enabled nested virtualization with the Anka command line installation instructions:

  • sudo installer -applyChoiceChangesXML nanka.xml -pkg AnkaBuild-1.4.3.104.pkg -target / If your hardware supports things properly, you should be able to install Docker for Mac inside the VM and use it.
@espoelstra
espoelstra / fix-desktop-launcher.sh
Created February 6, 2019 21:25 — forked from stuaxo/fix-desktop-launcher.sh
Launch desktop files instead of opening them in gedit.
$ sudo apt-get install dex
$ /usr/bin/dex -c /usr/bin/dex -t ~/.local/share/applications/
@espoelstra
espoelstra / Test-RebootRequired.ps1
Last active April 4, 2017 16:22 — forked from altrive/Test-RebootRequired.ps1
Check pending reboot on local computer (2008R2 and 2012R2 compatible ErrorAction)
#Based on <http://gallery.technet.microsoft.com/scriptcenter/Get-PendingReboot-Query-bdb79542>
function Test-RebootRequired
{
$result = @{
CBSRebootPending =$false
WindowsUpdateRebootRequired = $false
FileRenamePending = $false
SCCMRebootPending = $false
}
@espoelstra
espoelstra / gist:66d2c41f829892fe0655270574d9d314
Created January 6, 2017 23:09 — forked from ig0774/gist:1068598
Manage Windows Advanced Firewall with PowerShell
Set-StrictMode -Version Latest
# Constants
if (!(Test-Path variable:\NET_FW_DISABLED)) { Set-Variable NET_FW_DISABLED $False }
if (!(Test-Path variable:\NET_FW_ENABLED)) { Set-Variable NET_FW_ENABLED $True }
if (!(Test-Path variable:\NET_FW_IP_PROTOCOL_TCP)) { Set-Variable NET_FW_IP_PROTOCOL_TCP 6 }
if (!(Test-Path variable:\NET_FW_IP_PROTOCOL_UDP)) { Set-Variable NET_FW_IP_PROTOCOL_UDP 17 }
if (!(Test-Path variable:\NET_FW_PROFILE_DOMAIN)) { Set-Variable NET_FW_PROFILE_DOMAIN 0x1 }
if (!(Test-Path variable:\NET_FW_PROFILE_PRIVATE)) { Set-Variable NET_FW_PROFILE_PRIVATE 0x2 }
if (!(Test-Path variable:\NET_FW_PROFILE_PUBLIC)) { Set-Variable NET_FW_PROFILE_PUBLIC 0x2 }
@espoelstra
espoelstra / Install-OctopusServer.ps1
Created January 5, 2017 19:05 — forked from davidroberts63/Install-OctopusServer.ps1
Automate Octopus Deploy Server Install and Configuration
$commandArgs = "/i Octopus-Server.msi /quiet INSTALLLOCATION=C:\OctopusServer /lv Octopus-Server-Install-Log.txt"
Start-Process "msiexec" $commandArgs -Wait -Verb RunAs
@espoelstra
espoelstra / gist:e63e6ef9f4fc2c1a85ddb3066a4cd33e
Created December 30, 2016 23:35 — forked from DamianMac/gist:a944c0fcab6db531e7a5
Executing a Script Task via the Octopus API
var server = "http://yourserveraddress:8065/"; //Your server and IP address
var apiKey = "API-XXXXXXXXXXXXXXXXXXXXXXXXX"; // Get this from your 'profile' page in the Octopus web portal
var endpoint = new OctopusServerEndpoint(server, apiKey);
var repository = new OctopusRepository(endpoint);
var task = new Octopus.Client.Model.TaskResource();
task.Name = "AdHocScript";
task.Description = "Script invoked via API";
@espoelstra
espoelstra / Out-Diff.ps1
Created December 21, 2016 02:32 — forked from ecampidoglio/Out-Diff.ps1
A PowerShell function to colorize a sequence of text lines that represent an Universal Diff. For more information, see http://megakemp.com/2012/01/19/better-diffs-with-powershell/
function Out-Diff {
<#
.Synopsis
Redirects a Universal DIFF encoded text from the pipeline to the host using colors to highlight the differences.
.Description
Helper function to highlight the differences in a Universal DIFF text using color coding.
.Parameter InputObject
The text to display as Universal DIFF.
#>
[CmdletBinding()]
@espoelstra
espoelstra / installing-teamcity-on-windows.md
Created December 20, 2016 23:05 — forked from ArturDorochowicz/installing-teamcity-on-windows.md
Installing a TeamCity server on Windows.
@espoelstra
espoelstra / install-vsix-appveyor.ps1
Created November 11, 2016 20:48 — forked from FeodorFitsner/install-vsix-appveyor.ps1
Installing VSIX extension from command line
$vsixPath = "$($env:USERPROFILE)\sqlite-wp81-winrt-3081002.vsix"
(New-Object Net.WebClient).DownloadFile('https://visualstudiogallery.msdn.microsoft.com/5d97faf6-39e3-4048-a0bc-adde2af75d1b/file/132406/15/sqlite-wp81-winrt-3081002.vsix', $vsixPath)
"`"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\VSIXInstaller.exe`" /q /a $vsixPath" | out-file ".\install-vsix.cmd" -Encoding ASCII
& .\install-vsix.cmd