Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View finder39's full-sized avatar

Joe Neuman finder39

View GitHub Profile
blueprint:
name: Sonos Connect Sync - V2
description: Sync volume and source control between Sonos Connect and the receiver
it's connected to.
domain: automation
source_url: https://gist.github.com/Qonstrukt/ca1e761b2ec0a2d52fdb8c86490fbcbd
input:
sonos_connect:
name: Sonos
selector:
https://stackoverflow.com/questions/1459150/how-to-undo-git-commit-amend-done-instead-of-git-commit
# Move the current head so that it's pointing at the old commit
# Leave the index intact for redoing the commit.
# HEAD@{1} gives you "the commit that HEAD pointed at before
# it was moved to where it currently points at". Note that this is
# different from HEAD~1, which gives you "the commit that is the
# parent node of the commit that HEAD is currently pointing to."
git reset --soft HEAD@{1}
crfasrnnDir="${HOME}/crfasrnn"
serverSetupDir="${HOME}/serverSetup"
# install git if not installed
if ! hash git 2>/dev/null; then
apt-get install -y git
fi
#install unzip if not installed
if ! hash unzip 2>/dev/null; then
@finder39
finder39 / gist:be1b6eb04d05b3333490185f8883c072
Created August 1, 2016 03:23
Kill all detached screen sessions
screen -ls | grep Detached | cut -d. -f1 | awk '{print $1}' | xargs kill
@finder39
finder39 / Makefile.config
Last active December 23, 2016 09:53
caffe makefile that hopefully works
## Refer to http://caffe.berkeleyvision.org/installation.html
# Contributions simplifying and improving our build system are welcome!
# 32 bit / 64 bit indexing
USE_INDEX_64 := 1
# GreenTea (ViennaCL/OpenCL) backend switch
# Enable the CUDA backend
# USE_CUDA := 1
@finder39
finder39 / gist:82ebafbfce5569482ef5
Created December 9, 2015 03:13
Add new Xcode UUID to plugins
Get new UUID of Xcode with
`defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID`
Then put into Info.plist of plugins located at:
`~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins`
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@finder39
finder39 / gist:4f0f8b1972c677381631
Created March 7, 2015 01:14
Remove ll types of files from git repo
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
http://stackoverflow.com/questions/107701/how-can-i-remove-ds-store-files-from-a-git-repository
@finder39
finder39 / gist:24cc271adc6c127fc890
Created March 6, 2015 23:35
iOS app .gitignore
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
{
init: function(elevators, floors) {
var getByFloor = function (value) {
var result = floorsWaiting.filter(function(o){return o.floorNum == value;} );
return result? result[0] : null; // or undefined
}
var getElevatorById = function (arr, value) {
var result = arr.filter(function(o){return o.iden == value;} );
return result? result[0] : null; // or undefined
}