This file contains hidden or 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
| defaults -currentHost write com.apple.Bluetooth RemoteWakeEnabled 0 |
This file contains hidden or 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
| beforeEach(() => { | |
| fake = sinon.fakeServer.create(); | |
| // Fail on requests not covered by fakeserver | |
| fake.respondWith(xhr => { | |
| fail('FakeServer does not provide any result for URL ' + xhr.url) | |
| }); | |
| fake.respondImmediately = true; | |
| }); |
This file contains hidden or 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
| #!/bin/bash | |
| # Reset xHCI | |
| for xhci in /sys/bus/pci/drivers/?hci_hcd ; do | |
| cd $xhci | |
| echo Resetting devices from $xhci... | |
| for i in ????:??:??.? ; do | |
| echo -n "$i" > unbind | |
| echo -n "$i" > bind |
This file contains hidden or 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
| // Put this before every other fake.respondWith() to make this a 404 fallback | |
| fake.respondWith(xhr => { | |
| console.log(xhr.url); | |
| return [404, {}, 'Not found']; | |
| }); |
This file contains hidden or 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
| cat *txt | grep -B2 "Tests run:" | grep -v -- "--------" | grep -v "Failures: 0, Errors: 0" | grep -B1 "Tests run:" |
This file contains hidden or 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
| # Add a button to the collapsed control strip part on the Apple MBP Touch Bar. The media button occationally added by itunes | |
| # will be displaced. | |
| defaults write com.apple.controlstrip MiniCustomized -array-add com.apple.system.notification-center | |
| killall Controlstrip |
This file contains hidden or 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
| #!/bin/bash | |
| ADB=~/Downloads/android-sdk-macosx/platform-tools/adb | |
| REMOTE='storage/sdcard0/DCIM/Camera/' | |
| HERE='/Users/cybic/files/backup/R2D2-2/images' | |
| FILES=$(diff <($ADB shell "ls $REMOTE" | sort | perl -pe "~ s/\r//" ) <( ls $HERE ) | grep \< | sed 's/\<\ //') | |
| for f in $FILES |
This file contains hidden or 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
| var Promise = require('es6-promise').Promise; | |
| function test(a) { | |
| return new Promise( function(resolve, reject){ | |
| console.log( 'Running %s', a ); | |
| setTimeout( resolve.bind( this, 'dønn ' + a ), 5000); | |
| }); | |
| } |
This file contains hidden or 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
| area:closed|z14-[damage:event] { | |
| fill-color: #ffffff; | |
| color: red; | |
| width: 2; | |
| } | |
| area|z14-[idp:camp_site] { | |
| fill-color: #00ff00; | |
| } |
This file contains hidden or 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
| #!/bin/bash | |
| # | |
| # AutoSSH to host and create or connect to tmux session | |
| # Multi-hop version. Separate hops with `%`. Assign port with `:` | |
| # | |
| # $ remux-hop server.example.com sysop | |
| # $ remux-hop alice.example.com%bob.example.com sysop | |
| # $ remux-hop alice.example.com%bob@bob.example.com:2222 sysop | |
| # | |
| # Author: Oystein Steimler <oystein@nyvri.net> |
NewerOlder