Skip to content

Instantly share code, notes, and snippets.

@jjsanderson
jjsanderson / network-manager-raspbian-2020-02-05.md
Last active Jan 13, 2022
Installing Network Manager on Raspbian 2020-02-05
View network-manager-raspbian-2020-02-05.md

Installing Network Manager on Raspbian 2020-02-05

Default Raspbian is not able to connect to wifi networks using corporate security setups, including eduroam. However, the issue is that the packaged networking control widget does not expose the relevant security features, rather than any underlying hardware limitation. The solution has long been to install Network Manager and configure it to handle the wifi interface.

Unfortunately, previous installation approaches didn't work for me on the Raspbian 2020-02-06 image. Following a fresh install, the below is what I did to make it work. Note that this is actually simpler than previous recipes.

Install packages

sudo apt update
sudo apt install network-manager network-manager-gnome
@jjsanderson
jjsanderson / gist:4436933e79c04c024414aebf9c129abc
Last active Apr 26, 2019
VVV provision output (failure) 2019-04-26
View gist:4436933e79c04c024414aebf9c129abc
$ vagrant up --provision
__ __ __ __
\ V\ V\ V / Varying Vagrant Vagrants
\_/\_/\_/ v2.6.0-git::master
Platform: platform-darwin13.4.0 shell:/bin/bash vagrant-hostsupdater vagrant-vbguest
Vagrant: v2.2.4, VirtualBox: v6.0.6r130049
VVV Path: "/Users/xxxxx/vagrant-local"
Docs: https://varyingvagrantvagrants.org/
@jjsanderson
jjsanderson / heartsdict.py
Created Feb 23, 2017
Not sure this is a totally sane way of structuring the data, but … what can I say, I like dictionaries.
View heartsdict.py
import random
hearts = {
"QR001": [5, 38],
"QR002": [15, 60],
"QR004": [0, 00],
"QR005": [3, 92],
"QR093": [0, 92]
}
@jjsanderson
jjsanderson / find_empties2.py
Created Feb 23, 2017
Less (?) elegant way of finding empty indices of source list, using itertools
View find_empties2.py
import random
from itertools import compress, count
# Initial list of references
source = [0, 1, 3, 4, 0, 5, 7, 0]
print source
# Build list of indices of source where content is zero
empty = compress(count(), [not x for x in source])
emptylist = list(empty)
@jjsanderson
jjsanderson / find_empties.py
Created Feb 23, 2017
Demo Python to put data into randomly-selected, previously-empty element of a source list.
View find_empties.py
import random
# Initial list of references
source = [0, 1, 3, 4, 0, 5, 7, 0]
print source
# Build list of indices of source where content is zero
emptylist = [i for i, element in enumerate(source) if element == 0]
print emptylist
@jjsanderson
jjsanderson / dmesg_output.txt
Created Dec 7, 2016
dmesg output for a Raspberry Pi3 which fails to believe it has a wifi interface.
View dmesg_output.txt
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.4.21-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #911 SMP Thu Sep 15 14:22:38 BST 2016
[ 0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine model: Raspberry Pi 3 Model B Rev 1.2
[ 0.000000] cma: Reserved 8 MiB at 0x36800000
[ 0.000000] Memory policy: Data cache writealloc
@jjsanderson
jjsanderson / TrafficLights-Arduino.ino
Created Jul 28, 2016
Traffic Light code for Arduino
View TrafficLights-Arduino.ino
#define RED 9
#define AMBER 10
#define GREEN 11
void setup() {
pinMode(RED, OUTPUT);
pinMode(AMBER, OUTPUT);
pinMode(GREEN, OUTPUT);
}
View gist:050c3a38da050acbb724
for i in 0..( p_count -1 ) do
in_thread(name: i) do
loop do
chime p_freq[i], dur
sleep p_sleep[i]
end
end
end