I entcountered a bug with virtualbox-ose-nox11-5.2.14_1
& virtualbox-ose-kmod
after upgrading to FreeBSD 11.2-RELEASE on first reboot.
The system would enter a boot loop with this crash error:
supdrvGipCreate: failed to allocate the GIP page
import requests | |
import time | |
from datetime import datetime, timedelta | |
from requests.auth import HTTPBasicAuth | |
last_time = datetime.min | |
last_message = '' | |
while True: | |
basic = HTTPBasicAuth('admin', '${velop_password}') |
I entcountered a bug with virtualbox-ose-nox11-5.2.14_1
& virtualbox-ose-kmod
after upgrading to FreeBSD 11.2-RELEASE on first reboot.
The system would enter a boot loop with this crash error:
supdrvGipCreate: failed to allocate the GIP page
Using my perf-tools just to wrap ftrace: | |
# ./perf-tools/bin/kprobe 'p:tcp_v4_connect skc_dport=+2(%si):u16' | |
Tracing kprobe tcp_v4_connect. Ctrl-C to end. | |
telnet-9723 [001] d... 62326244.175951: tcp_v4_connect: (tcp_v4_connect+0x0/0x480) skc_dport=1600 | |
telnet-9725 [001] d... 62326246.502760: tcp_v4_connect: (tcp_v4_connect+0x0/0x480) skc_dport=1700 | |
telnet-9726 [001] d... 62326247.861937: tcp_v4_connect: (tcp_v4_connect+0x0/0x480) skc_dport=100 | |
telnet-9727 [001] d... 62326249.220740: tcp_v4_connect: (tcp_v4_connect+0x0/0x480) skc_dport=e803 | |
Now a crappy ntohs() to process the dport string: |
# Fastly | |
curl -s https://api.fastly.com/public-ip-list | jq -r '.addresses | .[]' | |
dig @8.8.8.8 +short txt _netblocks.google.com | awk '{gsub("ip4:","");for (col=2; col<NF;++col) print $col}' | |
# AWS | |
curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | \ | |
jq --raw-output '.prefixes | map(.ip_prefix) | .[]' |
More details - http://blog.gbaman.info/?p=791
For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt
file dtoverlay=dwc2
on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh
in the SD card as well. By default SSH i
by Bjørn Friese
Beautiful is better than ugly. Explicit is better than implicit.
I frequently deal with collections of things in the programs I write. Collections of droids, jedis, planets, lightsabers, starfighters, etc. When programming in Python, these collections of things are usually represented as lists, sets and dictionaries. Oftentimes, what I want to do with collections is to transform them in various ways. Comprehensions is a powerful syntax for doing just that. I use them extensively, and it's one of the things that keep me coming back to Python. Let me show you a few examples of the incredible usefulness of comprehensions.
There is a prebuilt Centos 6.5 VM with the below components installed:
There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.
All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.
What do these lines do? Make predictions and then scroll down.
func print(pi *int) { fmt.Println(*pi) }