Skip to content

Instantly share code, notes, and snippets.

View afreeland's full-sized avatar

Aaron Freeland afreeland

View GitHub Profile
@afreeland
afreeland / code.py
Last active March 23, 2017 12:41
Python - TensorFlow Fail
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import itertools
import pandas as pd
import numpy as np
import tensorflow as tf
@afreeland
afreeland / gist:29460fd2a2138843dba606a65c9a678a
Created February 3, 2017 15:04
SquirrelUpdateError GitHub
2017-02-03 09:01:16> Program: Starting Squirrel Updater: --update https://github.com/{User}/{Repo}/releases/download/0.0.2?access_token={access_token}
2017-02-03 09:01:16> Program: Starting update, downloading from https://github.com/{User}/{Repo}/releases/download/0.0.2?access_token={access_token}
2017-02-03 09:01:16> Program: About to update to: C:\Users\afreeland\AppData\Local\{app_name}
2017-02-03 09:01:16> CheckForUpdateImpl: Using existing staging user ID: 7edd3044-32e7-5fd3-9068-5ce586c09446
2017-02-03 09:01:16> CheckForUpdateImpl: Downloading RELEASES file from https://github.com/{User}/{Repo}/releases/download/0.0.2?access_token={access_token}
2017-02-03 09:01:16> FileDownloader: Downloading url: https://github.com/{User}/{Repo}/releases/download/0.0.2/RELEASES?access_token={access_token}&id={app_name}&localVersion=0.0.1&arch=amd64
2017-02-03 09:01:17> IEnableLogger: Failed to download url: https://github.com/{User}/{Repo}/releases/download/0.0.2/RELEASES?access_token={access_token}&id={app_name}&loc
@afreeland
afreeland / ps1
Created August 23, 2016 14:44
PowerShell: Excel Multiple Windows
$path = @("Registry::HKCR\Excel.Sheet.12","Registry::HKCR\Excel.Sheet.8")
foreach ($item in $path) {
# Path to Excel Shell
$registryPath = "$($item)\shell\Open\command"
$ddExecPath = "$($item)\shell\Open\ddeexec"
# Get our current value for the (default) property
@afreeland
afreeland / gist:4d26598cb8f1dfb2a1281b64481cd364
Last active May 23, 2016 15:39
SQL: Month name from number
-- Renders out May
Select DateName(month, DateAdd(month, 5, -1))
-- https://msdn.microsoft.com/en-us/library/ms174395.aspx
-- DateName(datepart, date)
-- https://msdn.microsoft.com/en-us/library/ms186819.aspx
-- DateAdd(datepart, number, date)
-- @datepart - the particular part of the date (year, month, etc.,) that will be incremented by an integer
-- @number - the month we are targeting
@afreeland
afreeland / gist:4eb18990d784c87bd3379642999d72c1
Last active May 23, 2016 15:38
SQL: Month name from number
-- Renders out May
Select DateName(month, DateAdd(month, 5, -1))
-- https://msdn.microsoft.com/en-us/library/ms174395.aspx
-- DateName(datepart, date)
-- https://msdn.microsoft.com/en-us/library/ms186819.aspx
-- DateAdd(datepart, number, date)
-- @datepart - the particular part of the date (year, month, etc.,) that will be incremented by an integer
-- @number - the month we are targeting
@afreeland
afreeland / CMD:Domain User Request
Created April 1, 2016 20:24
Gets a full list of information for a domain user including their Active Directory group memberships
cmd /k net user <username> /Domain
@afreeland
afreeland / NSSM commands
Last active March 15, 2016 13:14
NSSM: Manage Service Commands
nssm remove "pim-engine" confirm
nssm install "pim-engine" "C:\Program Files\nodejs\node.exe" "C:\sites\node\pim-engine\20130313_master_custom\pim-engine-master\app.js"
nssm set "pim-engine" appDirectory "C:\sites\node\pim-engine\20130313_master_custom\pim-engine-master"
net start "pim-engine"
nssm remove "pim-api" confirm
nssm install "pim-api" "C:\Program Files\nodejs\node.exe" "C:\sites\node\pim-api\20160313_master_4185353\pim-api-master\appServer.js"
nssm set "pim-api" appDirectory "C:\sites\node\pim-api\20160313_master_4185353\pim-api-master"
net start "pim-api"
git checkout -- <file>
# Use $profile to find the directory and file that needs to be used or created
# http://www.howtogeek.com/50236/customizing-your-powershell-profile/ good guide to profiles
function dbug ($filename){
$npm = "C:\Program Files\nodejs\node.exe"
$arguments = '--no-preload -d 5888 -b false' + $filename
start-process "node-debug" -ArgumentList $arguments -nonewwindow
}
git push origin develop