In the boot
partition of the SD card, create an empty ssh
file:
touch ssh
To setup the wifi, create wpa_supplicant.conf
and add the following:
country=US
# Copy a file from local to server | |
scp ~/rebels.txt [email protected]:~/revenge | |
# Copy a directory from server to local | |
scp -r [email protected]:~/revenge ~/revenge | |
# Copy multiple files from server to local | |
scp [email protected]:"revenge/*.txt" ~/revenge/ | |
# Copy file between two servers |
In the boot
partition of the SD card, create an empty ssh
file:
touch ssh
To setup the wifi, create wpa_supplicant.conf
and add the following:
country=US
class ReadLine: | |
def __init__(self, s): | |
self.buf = bytearray() | |
self.s = s | |
def readline(self): | |
i = self.buf.find(b"\n") | |
if i >= 0: | |
r = self.buf[:i+1] | |
self.buf = self.buf[i+1:] |
Flask apps are bound to port 5000 by default. To bind it to port 80, you would need to change the port as follows:
if __name__ == '__main__':
app.run(host='0.0.0.0', port=80, debug=True)
And to run it:
var FeedReader = { | |
settings: { | |
feedItemsCount: 10, | |
url: 'http://someurl.com/news/feed/', | |
feedListing: $('div#feedListing'), | |
loadFeedButton: $('a.loadFeed') | |
}, | |
init: function () { |
Although sudo apt install nodejs
works, it's not recommended because there will be permission issues when trying to install packages globally (ie. npm install -g sass
).
A better way to install Node.js is to use Node Version Manager (nvm).
# Check the github page for the latest version
This seems to be a common problem on most MSI laptops, including my own GP62 6QF Leopard Pro. Supposedly, one way to fix it would be to update your BIOS, however, this didn't work for me.
I managed to fix this by adding this to /usr/share/X11/xorg.conf.d/10-quirks.conf
:
Section "InputClass"
Identifier "Spooky Ghosts"
MatchProduct "Video Bus"
Option "Ignore" "on"
EndSection
import sys | |
print('Hello') | |
sys.stdout.flush() | |
# Output will be: | |
# Nov 27 19:31:09 rpi python[334]: Hello |
#!/usr/bin/env bash | |
# Generates a changelog between tagged releases. Collects commits of pull requests, major, and bugfix tags | |
repository_url="https://bitbucket.org/MYPROJECT/MYREPO" | |
function generate_changelog() { | |
previous_tag=0 | |
for current_tag in $(git tag --sort=-creatordate) | |
do | |
if [ "$previous_tag" != 0 ];then |
myscript.service
). Change Description=
, User=
, and ExecStart=
.[Unit]
Description=My Service
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always