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 | |
sudo apt-get install xserver-xorg xserver-xorg-core x11-apps x11-xserver-utils |
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
# security measures: | |
# - change ssh port to 20022 | |
sed -i 's/#Port 22/Port 20022/' /etc/ssh/sshd_config | |
# - disallow root login | |
sed -i 's/PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config | |
# - disallow password auth | |
cat >> /etc/ssh/sshd_config << EOF | |
PasswordAuthentication no | |
AllowUsers deploy | |
EOF |
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
<!DOCTYPE html> | |
<head> | |
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="HandheldFriendly" content="true"> | |
<style> | |
button { font-size: xx-large; } | |
</style> |
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
const getUuid = (i) => { | |
const num = i.toString(); | |
const id = ("0").repeat((4 - num.length) > 0 ? (4 - num.length) : 0) + num; | |
return 'd7e5' + id + '-0109-4306-956f-2f725ba7a85d'; | |
}; | |
var s = new Serial(); | |
s.setup(9600,{rx: D33, tx: D34}); | |
let buffer = ''; |
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
. /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash | |
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh | |
export PATH="$PATH:$HOME/bin" | |
[ -f /home/linuxbrew/.linuxbrew/etc/bash_completion ] && . /home/linuxbrew/.linuxbrew/etc/bash_completion | |
source /home/linuxbrew/.linuxbrew/etc/bash_completion.d/git-prompt.sh | |
PS1="\[\033[32m\][\[\033[1;32m\]\w]\[\033[0m\]\$(__git_ps1) \n\[\033[1;36m\]\u\[\033[32m\]$ \[\033[0m\]" |
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
<!DOCTYPE html> | |
<head> | |
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="HandheldFriendly" content="true"> | |
<style> | |
button { font-size: xx-large; } | |
</style> |
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
const neopixel = require("neopixel"); | |
const numPixels = 7; | |
const pixelPin = 29; | |
const filledArr = (val, length) => { | |
const arr = new Uint8ClampedArray(length); | |
return arr.fill(val); | |
}; | |
const emptyArr = (length) => { | |
return filledArr(0, length); |
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
{"lastUpload":"2020-11-03T11:32:48.885Z","extensionVersion":"v3.4.3"} |
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
const P1_01 = 33; | |
const P1_02 = 34; | |
const P1_12 = 44; | |
const P1_13 = 45; | |
const P1_14 = 46; | |
const A = { | |
MOSI: 11, | |
MISO: 12, | |
SCK: 13, | |
SDA: 28, |
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
let pressCount = 0; | |
const batteryPercentage = () => (NRF.getBattery() - 2) * 100; | |
const LIGHT = 0xFFFF; | |
const FAN = 0xFFFE; | |
const LIGHT_FAN_ON = 0xFFFD; | |
const LIGHT_FAN_OFF = 0xFFFC; | |
E.on("init", () => { | |
NRF.setAdvertising({ |
NewerOlder