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
While (-Not (Get-PnpDevice -PresentOnly | Where-Object { $_.Class -eq 'XboxComposite' })) { | |
echo 'Plug in the controller first...' | |
pause | |
} | |
Start-Process 'steam://rungameid/275850' |
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
#-rwxr-xr-x 1 root root /etc/systemd/system/disable-leds.service | |
[Unit] | |
Description=Disable LEDs | |
[Service] | |
ExecStart=/usr/bin/lan951x-led-ctl --fdx=0 --lnk=0 --spd=0 | |
[Install] | |
WantedBy=multi-user.target |
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
#!/bin/bash | |
# MOUNT PARTITION TO /tmp/usb/ | |
# write zeroes to empty space | |
dd if=/dev/zero of=/tmp/usb/tmpzero.txt | |
rm /tmp/usb/tmpzero.txt | |
# clone whole disk (including free space) | |
dd if=/dev/sdb conv=sparse | gzip > ~/Documents/Raspberry-Pi-Arch-$(date -Iseconds).img.gz |
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
(function () { | |
const daysSinceEpoch = Math.floor(Date.now()/1000/60/60/24); | |
const magicNumber = 2578; | |
const xwordNum = daysSinceEpoch - magicNumber; | |
window.location = `https://www.theguardian.com/crosswords/quick/${xwordNum}`; | |
})(); |
js-to-css.js
| js-to-css.min.js
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
// This totally needs refactoring... | |
// Also, solarized colours are wrong (brackets red, commas grey, keys green, values blue) | |
(function (w) { | |
// http://stackoverflow.com/a/7220510/706561 | |
function syntaxHighlight(json) { | |
json = json.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>'); | |
return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) { | |
var cls = 'number'; | |
if (/^"/.test(match)) { |
NewerOlder