This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
screen -ls | grep Detached | cut -d. -f1 | awk '{print $1}' | xargs kill |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Xcode | |
# | |
build/ | |
*.pbxuser | |
!default.pbxuser | |
*.mode1v3 | |
!default.mode1v3 | |
*.mode2v3 | |
!default.mode2v3 | |
*.perspectivev3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
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 | |
} |
NewerOlder