Skip to content

Instantly share code, notes, and snippets.

View geoffappleford's full-sized avatar

Geoff Appleford geoffappleford

  • Nottingham Road, South Africa
View GitHub Profile
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco install 7zip /y
choco install adobereader /y
choco install arduino /y
choco install azure-cli /y
choco install chocolatey /y
choco install chocolatey-core.extension /y
choco install docker-for-windows /y
choco install firefox /y
@geoffappleford
geoffappleford / Insert external worksheets (1).EXCEL.yaml
Created March 9, 2020 19:03
Inserts worksheets from another workbook into the current workbook.
name: Insert external worksheets (1)
description: Inserts worksheets from another workbook into the current workbook.
host: EXCEL
api_set: {}
script:
content: |
$("#file").change(() => tryCatch(insertSheets));
$("#go").click(() => $("#file").click());
async function insertSheets() {
@geoffappleford
geoffappleford / Program.cs
Created August 14, 2018 03:43 — forked from analogrelay/CommandLineException.cs
Easy way to debug command-line apps
private static int Main(string[] args)
{
#if DEBUG
if (args.Any(a => a == "--debug"))
{
args = args.Where(a => a != "--debug").ToArray();
Console.WriteLine($"Ready for debugger to attach. Process ID: {Process.GetCurrentProcess().Id}.");
Console.WriteLine("Press ENTER to continue.");
Console.ReadLine();
}
@geoffappleford
geoffappleford / BoxStarter1.txt
Last active May 24, 2018 12:06
Boxstarter Script
Install-WindowsUpdate -AcceptEula
Update-ExecutionPolicy Unrestricted -Force
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
if (Test-PendingReboot) { Invoke-Reboot }
# Update Windows and reboot if necessary
Install-WindowsUpdate -AcceptEula
if (Test-PendingReboot) { Invoke-Reboot }
@geoffappleford
geoffappleford / gist:949f123b18d3358b07be1626ffce3a3b
Created February 12, 2018 09:40
Allow pasting on sites where blocked
var allowPaste = function(e){
e.stopImmediatePropagation();
return true;
};
document.addEventListener('paste', allowPaste, true);
#!/bin/bash
set -e
GVERSION="1.8"
GFILE="go$GVERSION.linux-amd64.tar.gz"
GOPATH="$HOME/go"
GOROOT="/usr/local/go"
if [ -d $GOROOT ]; then
echo "Installation directories already exist $GOROOT"
@geoffappleford
geoffappleford / gist:6087882
Created July 26, 2013 10:31
Fix for RazorGenerator custom tool not running in VS 2012
void Main()
{
var extFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), @"AppData\Local\Microsoft\VisualStudio\11.0\Extensions");
var source = Path.GetDirectoryName(Directory.GetFiles(extFolder, "*.dll", SearchOption.AllDirectories).FirstOrDefault(f => f.EndsWith("RazorGenerator.dll")));
var assemblyBaseFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), @"AppData\Local\assembly\dl3");
var assemblyFolders = Directory.GetFiles(assemblyBaseFolder, "*.dll", SearchOption.AllDirectories).Where(f => f.Contains("RazorGenerator"))
.Select(c => Path.GetDirectoryName(c));
foreach (var target in assemblyFolders){