Skip to content

Instantly share code, notes, and snippets.

View denolfe's full-sized avatar

Elliot DeNolf denolfe

View GitHub Profile
@denolfe
denolfe / init.lua
Created December 4, 2016 20:31 — forked from prenagha/init.lua
Hammerspoon Config File, Hyper Key, Karabiner-Elements
-- hattip https://github.com/lodestone/hyper-hacks
-- hattip https://gist.github.com/ttscoff/cce98a711b5476166792d5e6f1ac5907
-- A global variable for the sub-key Hyper Mode
k = hs.hotkey.modal.new({}, 'F18')
-- Hyper+key for all the below are setup somewhere
-- The handler already exists, usually in Keyboard Maestro
-- we just have to get the right keystroke sent
@denolfe
denolfe / osx-setup.sh
Created December 17, 2016 21:09 — forked from somebox/osx-setup.sh
Set up an OSX machine from zero to awesome. Uses Homebrew (and cask, fonts, etc). Focused on Ruby/Rails development, includes rvm, xquartz, editor fonts, sublime text, and many tools.
#!/bin/bash
# A script to set up a new mac. Uses bash, homebrew, etc.
# Focused for ruby/rails development. Includes many utilities and apps:
# - homebrew, rvm, node
# - quicklook plugins, terminal fonts
# - browsers: chrome, firefox
# - dev: iterm2, sublime text, postgres, chrome devtools, etc.
# - team: slack, dropbox, google drive, skype, etc
@denolfe
denolfe / 00-about-search-api-examples.md
Created February 6, 2017 03:31 — forked from jasonrudolph/00-about-search-api-examples.md
5 entertaining things you can find with the GitHub Search API
@denolfe
denolfe / README.md
Created March 10, 2017 21:30 — forked from savetheclocktower/README.md
Poor-man's LEDBlinky with RetroPie and Pac-Drive

RetroPie, LED control, and you

I wanted LEDBlinky-style functionality out of my RetroPie cabinet. But I didn't need RGB control or magical frontend integration or anything like that. I had buttons with simple single-color LEDs.

I've got a simple control panel with six buttons per player. All I wanted was this:

  • When I launch Street Fighter 2, all twelve buttons should light up.
  • When I launch The Simpsons, only the first two buttons for each player should light up.
  • When I launch Pac-Man, none of the buttons should light up.
@denolfe
denolfe / DynamicJsonDeserializer.cs
Last active January 9, 2018 20:23 — forked from rdingwall/DynamicJsonDeserializer.cs
RestSharp deserialize JSON to dynamic #snippet
// ReSharper disable CheckNamespace
namespace RestSharp.Deserializers
// ReSharper restore CheckNamespace
{
public class DynamicJsonDeserializer : IDeserializer
{
public string RootElement { get; set; }
public string Namespace { get; set; }
public string DateFormat { get; set; }
@denolfe
denolfe / raw_layout.json
Created November 11, 2017 20:16 — forked from danlangford/raw_layout.json
standard, rainbow underlight, white backlight
{
"header": {
"Variant": "standard",
"Generator": "NONE",
"Base": "Base",
"Date": "2017-11-06",
"KLL": "0.5c",
"Author": "danlangford (Dan Langford) 2017",
"Version": "0.1",
"Name": "KType",
@denolfe
denolfe / MachineSetup.ps1
Created November 20, 2017 18:39 — forked from raelyard/MachineSetup.ps1
New Dev Machine Script
# to execute:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
# Install-BoxstarterPackage -PackageName https://gist.githubusercontent.com/raelyard/6783972a17ba1bc14e83/raw/ -DisableReboots
Disable-UAC
# Windows Explorer has undesirable defaults - fix for this installation:
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar -DisableOpenFileExplorerToQuickAccess -EnableShowFrequentFoldersInQuickAccess
# Override Chocolatey default of asking for confirmation on everything
@denolfe
denolfe / ps-download-all-nuget-packages
Created January 31, 2018 18:00 — forked from bevand/ps-download-all-nuget-packages
Powershell script to download all packages from a nuget feed
$destinationDirectory = "C:\LocalNuGetTest\"
$webClient = New-Object System.Net.WebClient
$webClient.Credentials = New-Object System.Net.NetworkCredential("USERNAME", "PASSWORD")
$feed =[xml]$webClient.DownloadString("https://hostednugetfeed.com/custom-feed/nuget/v2/Packages")
$records = $feed | select -ExpandProperty feed | select -ExpandProperty entry #| select -ExpandProperty content
for ($i=0; $i -lt $records.Length; $i++) {
$content = $records[$i] | select -ExpandProperty content
$properties = $records[$i] | select -ExpandProperty properties
@denolfe
denolfe / Move-Nested-Files-To-Top-Level.ps1
Last active January 31, 2018 19:11
Move nested files to top level directory #Snippet
Get-ChildItem -Path C:\Packages -Recurse -Filter *.nupkg | Copy-Item -Destination C:\Packages -Force
@denolfe
denolfe / install-go.ps1
Last active February 2, 2018 17:12 — forked from andrewkroh/install-go.ps1
Install Golang using Powershell
# Installs golang on Windows.
#
# # Run script:
# .\install-go.ps1 -version 1.9.3
#
# # Download and run script:
# $env:GOVERSION = '1.9.3'
# iex ((new-object net.webclient).DownloadString('SCRIPT_URL_HERE'))
Param(
[String]$version,