Skip to content

Instantly share code, notes, and snippets.

View absynce's full-sized avatar

Jared M. Smith absynce

View GitHub Profile
@absynce
absynce / keymap.cson
Created May 1, 2019 22:46
Atom elmjutsu keybindings
# elmjutsu
'atom-text-editor:not([mini])[data-grammar^="source elm"]':
'f12': 'elmjutsu:go-to-definition'
'ctrl-r': 'elmjutsu:go-to-symbol'
'shift-f12': 'elmjutsu:find-usages'
'f8': 'elmjutsu:go-to-next-usage'
'shift-f8': 'elmjutsu:go-to-previous-usage'
'ctrl-f12': 'elmjutsu:go-back'
'alt-enter': 'elmjutsu:add-import'
'f2': 'elmjutsu:rename-symbol'
@absynce
absynce / move-files-in-directory.sh
Last active October 27, 2016 18:21
Move files in a directory based on file prefix
# TODO: make this a real shell script with variables, this is a one liner for a bash shell prompt.
ls | grep -oP '(?<=hx).*' | perl -ne 'print "hx$_ healthtrax$_"' | xargs -n 2 git mv
@absynce
absynce / git-delete-local-from-pruned-remote.sh
Last active September 2, 2016 20:52
Delete local git branch when pruned from remote
git remote prune origin > delete-branches.txt
# Filter out non-branch names.
grep -oP '(?<=] origin\/).*' ./delete-branches.txt | xargs -L1 git br -d
@absynce
absynce / LINQPadDumpJsonExtension.cs
Last active February 17, 2016 22:40
Outputs an object as Json in LINQPad. Adapted from http://stackoverflow.com/a/17602769/448876.
public static class MyExtensions
{
// Adapted from http://stackoverflow.com/a/17602769/448876.
public static String DumpJson<T>(this T obj)
{
return
obj
.ToJson()
.Dump();
}
@absynce
absynce / CreateChromeAppLink.ps1
Created February 2, 2016 18:09
Create a Chrome shortcut link to run a URL as an application. It can set link icon location and to open maximized.
@absynce
absynce / SetChromeUpdates.ps1
Created May 19, 2015 21:06
Enable or disable Chrome updates in Windows via the registry - replaces https://gist.github.com/absynce/c35b93e27ababbeb9063
# *******************************************
#
# Mod by: Jared M. Smith
# Mod on: 2015.04.xx
# Mod y?: Enable or disable Google Chrome updates.
#
# *******************************************
# Log method
if (! (test-path function:Log)) { function Log { Param([string]$message) Write-Host $message; } }
@absynce
absynce / DisableChromeUpdates.ps1
Created February 4, 2015 21:23
Disable Chrome updates in Windows via the registry.
# *******************************************
#
# Mod by: Jared M. Smith
# Mod on: 2015.01.14
# Mod y?: Disable Google Chrome updates.
#
# *******************************************
# Log method
function Log { Param([string]$message) Write-Host $message; }