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
https://github.com/raspberrypi/linux/issues/963 | |
I found that changing a line in /etc/nsswitch.conf fixes it, with avahi-daemon running. | |
"hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4" | |
should become: | |
"host: files dns" |
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
# for 2.4G networks; the edimax adapter does not support 5G | |
pi@raspberrypi ~ $ sudo cat /etc/wpa_supplicant/wpa_supplicant.conf | |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
network={ | |
ssid="$SSID" | |
psk="$PRE_SHARED_KEY" | |
proto=RSN | |
key_mgmt=WPA-PSK |
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
sudo raspi-config | |
Advanced > SSH > Enable |
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
(defn diamond [width offset] | |
(doseq [w (take-nth 2 (concat (range 1 width) (range width 0 -1)))] | |
(do | |
(print (apply str (repeat offset " "))) | |
(print (apply str (repeat (/ (- width w) 2) " "))) | |
(print (apply str (repeat w "x"))) | |
(println)))) |
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
(defn fizzbuzz [start end] | |
(doseq [n (range start end)] | |
(cond | |
(zero? (mod n 15)) (println "FizzBuzz") | |
(zero? (mod n 5)) (println "Buzz") | |
(zero? (mod n 3)) (println "Fizz") | |
:else (println n)))) |
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
def diamond(width, offset): | |
for w in (range(1, width) + range(width, 0, -1))[::2]: | |
print " " * offset, | |
print " " * int((width - w) / 2), | |
print "x" * w |
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
from bottle import Bottle | |
app = Bottle() | |
@app.route('/') | |
def index(): | |
'''test me''' | |
return '<h1>Hello Bottle!</h1>' | |
app.run(host='localhost', port=8080, server='gunicorn', reload=True, workers=4, debug=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
# ... more above ... | |
# wsfl bash is not a login shell | |
if [ -d "$HOME/bin" ] ; then | |
PATH="$HOME/bin:$PATH" | |
fi | |
# ssh-agent configuration | |
if [ -z "$(pgrep ssh-agent)" ]; then | |
rm -rf /tmp/ssh-* |
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
[[snippets]] | |
description = "list remote branches" | |
command = "git branch -r" | |
output = "" | |
[[snippets]] | |
description = "list all local and remote branches" | |
command = "git branch -a" | |
output = "" |
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
sudo apt-get install screen | |
screen | |
PACKAGES=( | |
"build-essential" | |
"libbz2-dev" | |
"libdb5.3-dev" | |
"libexpat1-dev" | |
"libffi-dev" |
OlderNewer