In April 2025, I’ve ordered two OrangePi RV2, as soon as they announced Ubuntu 22.04 support, they are running 24x7 since then.
The Ky X1 CPU is a RISC-V (RISC-V is open and royalty-free), 8 Core, the architecture is riscv64, (so not arm64/aarch64).
Linux risc5 6.6.63-ky #1.0.0 SMP PREEMPT Wed Mar 12 09:04:00 CST 2025 riscv64 riscv64 riscv64 GNU/Linux It has two M.2 sockets, I have it installed with a 256GB NVMe drive, two Gigabits Ethernet ports, particularly useful for a direct interconnect in a cluster.
TLDR: A recent Qt update let you do gRPC calls directly from QML, allowing to interact with gRPC from the UI without requiring C++.
Qt is a rich ecosystem for UI development, but its roots are in C++.
QML is a declarative language specialized in designing user interface applications on top of Qt.
Qt supported gRPC for a long time but only via C++ code, recently they added gRPC calls directly from QML/Qt Quick.
Apache Superset is a popular data visualization tool, often referred to as a Business Intelligence (BI) tool. It provides polyglot visual interfaces to various databases.
Integrating DuckDB with Superset can significantly enhance its capabilities, enabling it to read Parquet files and perform spatial queries among other features.
TL;DR: You can use DuckDB with Superset using a slightly modified image
Here is how I’m using it.
Add DuckDB drivers to the Docker image First let’s build a docker image with DuckDB supports on top of the existing Superset image:
The CLI tools ecosystem is very alive, I feel this trend restarted with the Go and Rust languages, for the best.
I’ve used some CLI commands for multiple decades, it’s hard to force new habits, but some of those new tools really justify some efforts.
This is a list of some I’ve adopted already or trying to adopt, obviously opiniated choices:
Yazi Terminal file manager You can select multiple file with space then open them using enter.
Benthos, now renamed Redpanda Connect and the fork Bento, is a data stream processor, think anything Inputs: Kafka, NATS, SQS, S3, a socket, HTTP … modify the content, then send it to anything outputs.
I love that tool so much, that I was convinced I’ve blogged about it already which I did not.
It can be used for mostly anything streams related. Surely we could do the same thing with some real code as well, using our usual programming language, but anything resembling a basic stream processor, will always be the same boring code.
Previous post was about discovering a new offer in the Kubernetes Gateway space Envoy Gateway, in this one I’ll share some notes to make it to production.
Envoy Gateway is still rough on the edges, but remember Gateway is mainly a Kubernetes API frontend to provision Envoy Proxy, Envoy Proxy configuration can still be patched to enable a specific feature.
Enable Patching Patching is not enabled by default, create this configmap if you need it:
Envoy Proxy is a well known proxy load balancer offering HTTP, gRPC, TCP, customizable with Lua, Go, WASM … It’s often the core component used to build gateways/proxies for Kubernetes. For example Istio is using it as a proxy load balancer for ingresses but also as a sidecar to create a “mesh network”.
Envoy Gateway is a more recent project to manage Envoy proxies inside Kubernetes, it is meant to be a common foundation to build on top of it, but it can be used directly as it is.
H3 is a geospacial indexing library created by Uber. If you are familiar with this blog it’s similar to S2.
Uber is providing h3 for Go. Unfortunately it’s a CGO version, a C to Go binding as you may know CGO is not Go.
Having a native Go library is easier to deal with but would mean a full rewrite.
Transpiling You may have heard about a recent effort to transpile C to Go using ccgo and the associated libc.
I’m still using my arm64 4 nodes cluster for experimentation and even to serve some websites. Since I wanted to test some new Cloudflare features, I migrated one of my domain which has a bunch of websites on it.
But first a quick and simple way to serve some static pages:
Serving Static Pages One way is to build an image with the actual pages in it and let Kubernetes serves them.
My buddy and I bought some lands (20ha/50acres) in the Quebec province.
Creating a new problem It all started because as a new “forest owner”, I wanted to do a tree survey.
There are some good mobile apps to recognize flowers and trees but nothing professionally graded I knew (except paying for human expert).
I also needed a solution that would work offline since the mobile network coverage is not good on the field.
I’ve already posted about gomobile on this blog: “Using gomobile for real”.
For a lot of people it seems crazy to run Go on iOS and Android for some others it’s just routine, Zenly & Tailscale to name a few.
Since I’m reviving the idea for a geo database on iPhone here are some details.
I’ve started to port spatialite with the required dependencies to realize most of them were LGPL and incompatible with iOS distribution, so I went back to a simple solution using Go to display points on a map from a local database.
Swig is a tool to generate bindings for c/c++, it can produce bindings for Python, Java, Go and more.
Unfortunately Swig for Go is very limited, so as the Swig & Go documentation.
Here are some notes taken while writing a binding from c++ to Go:
To bind standard types into Golang Let’s look at this c++ function:
int64_t Ticks() const; Simply include sdtint into Swig
%include "stdint.i" It will translate into Go
TL;DR; simply run docker pull akhenakh/kvtiles:planet-9-latest for a self hosted free performant world map (more maps and levels available see kvtiles docker tags).
I’ve blogged in the past to describe how to generate and serves your own map tiles server, but I wanted an easier solution.
KVTiles kvtiles is a map tiles self hosted solution written in Go, it’s using Mapbox vector format but rather than using the regular sqlite3 database it’s using a key-value storage.
To simplify distribution k3s does not ship with zfs support.
But can work with by relying on an existing containerd enabled zfs, here is how:
Requierements Install cni-plugins and crictl
Ensure your containerd includes the zfs plugins:
ctr plugins ls ... io.containerd.snapshotter.v1 zfs linux/amd64 ok Configuration Create the default containerd config file
mkdir -p /etc/containerd/ containerd config default > /etc/containerd/config.toml Change the snapshotter to "zfs"
[plugins."io.containerd.grpc.v1.cri".containerd] snapshotter = "zfs" And in my special Arch case also change the path to the cni binaries:
TL;DR; Knowing your data helps compress them better than common algorithms.
Problem For one of my side projects, an IoT database, I wanted a specialized time series to store timestamps coupled with coordinates.
I needed a simple solution which allows live and cold compressed storage with gaps in it: IoT devices can be off for days then reappear.
But couldn’t find anything fitting my needs, the Gorilla Paper from Facebook is really nice but expects a 4 hours maximum gap between time events.
Here in Quebec, winter is so cold it can drain your phone battery very fast. I wanted a private and secure solution for my hikes, so I can be followed on a map.
This post will introduce you to LoRaWAN and how to install your own IoT mapping application using open source tools and a new project I’m working on written in Go.
Radio Network LoRaWAN is a network layer protocol for managing communication between LoRa devices and gateways.
If you are familiar with this blog you know I really appreciate Kubernetes: as a former ops I strongly believe Kubernetes is one way to bundle “the sum of 20y ops good practices”.
But there are others solutions one is Nomad.
It’s made by Hashicorp, creators of Vault, Consul, Terraform…
In general Hashicorp is synonym with quality.
Nomad is a task scheduler, a task could be execute a command, run a Docker container or a QEMU vm…
Following my earlier post about Traefik 2 and Kubernetes, here are some advanced configuration examples and a full yaml example at the end of this post:
Protecting a route with a password Create an htpasswd file named users for a user admin
htpasswd -c users admin Use kubectl to create the secret (easier for multi lines file).
kubectl create secret generic admin-authsecret --from-file=users Create a middleware for authentication:
apiVersion: traefik.containo.us/v1alpha1 kind: Middleware metadata: name: admin-auth spec: basicAuth: secret: admin-authsecret Then apply this admin-auth middleware to each IngressRoute you want to protect.
Maps are fun, self hosted maps are awesome !
Serving world maps was reserved to big companies like Google, thanks to the OpenStreetMap project, we now have access to an open world of data.
Generating Tiles MapBox (and others) worked hard to create a vector format bundled in a SQLite file: mbtiles format.
It’s vector based as opposed to older raster maps containing 256x256 PNG images.
The Openmaptiles folks did a great job automating the map generation.
I’ve been using Google Compute Platform (GCP) & Google Kubernetes Engine (GKE) for years.
And I love it, I hated AWS since the first release to these days, naming is cumbersome, UX is terrible…
Here are a quick survey of the tools and how I’ve used them for small to medium projects:
Cloud Build Cloud Build is super easy, it’s a scriptable CI/CD, very similar to Github Actions, there is a one hour free tier per day, the default machine is very slow, it can be tuned in the cloudbuild.
Traefik 2.0 is here !
Traefik is a reverse proxy load balancer (and more), it can learn the routes to respond to by discovering them in multiple providers, Docker, Kubernetes …
Traefik v1.x is very stable, v2.x is fresh new tech, with breaking changes and unfinished documentation, so test it first.
From Traefik’s documentation:
Providers discover the services that live on your infrastructure (their IP, health, …) Entrypoints listen for incoming traffic (ports, …) Routers analyze the requests (host, path, headers, SSL, …) Services forward the request to your services (load balancing, …) Middlewares may update the request or make decisions based on the request (authentication, rate limiting, headers, …) Kubernetes In Traefik v1, Kubernetes ingress were used to discover the routes:
Github delivered a beta Github Actions, it’s a worflow that can run almost anything related to your code, like a CI/CD.
Here is a workflow for Go 1.13 module projects and golangci-lint.
name: golangci-lint on: [push] jobs: build: name: Build runs-on: ubuntu-latest steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 with: go-version: 1.13 id: go - name: Check out code into the Go module directory uses: actions/checkout@v1 - name: Install golangci-lint run: curl -sfL https://raw.
Here is a simple yet useful trick to access web interface within your cluster.
As stated in the Kubernetes documentation you can use kubectl proxy.
I’ve seen a lot of people using the proxy to access the dashboard but you can use it to access any web interfaces, without the need to create an ingress and protect it, especially useful in dev environment.
http://kubernetes_master_address/api/v1/namespaces/namespace_name/services/service_name[:port_name]/proxy For example here is how to access the Traefik dashboard described as follow:
I’m still playing with my 3 nodes arm64 cluster, having some stability issues with k3s, I turned into kubeadm to deploy a bare metal non HA one master two workers Kubernetes cluster.
My host is Arch which is theoretically not supported but still works.
Required tasks sudo pacman -S ethtool ebtables socat cni-plugins Install aur/kubelet-bin and aur/kubeadm-bin
I needed a private registry to host my images, on master node:
docker run -d -p 5000:5000 --restart=always -v /opt/local-path-provisioner/registry:/var/lib/registry --name registry registry:2 On all hosts:
I’m evaluating k3s a Lightweight Kubernetes on a 3 nodes arm64 cluster (RK3328 Quad arm64).
At the time of writing the stable release is k3s v0.6.1.
Here are my notes:
If you haven’t installed k3s with the install.sh, you may need to load some modules: br_netfilter and overlay
Docker is not needed since k3s is using containerd but it seems I had to start docker to initialized the whole cgroups, at least on Arch
The H96 Max + is an Android 8.1 box with a Rockchip 3328, 4Gb RAM and 32G or 64G builtin eMMC, it’s the same chipset as the Rock64, it costs around 60 USD.
The only downside of this board is the 100Mb network link, can be a non issue using a USB network adapter.
July 2020 EDIT: Works with mainline, look at the bottom.
Here are some notes how to install Arch Linux on the H96 to make it a small server appliance.
Here are my notes to install Arch on a Rock64 and boot on USB first.
Warning, you can brick your device (but can unbrick it), you are on your own.
Follow Arch Instructions to Install on an SD Card
Boot on it
Insert your USB device and follow the exact same installation but this time to the /dev/sdadevice
At the end
Mount / into root again Run blkid to grab the UUID of your /
Caddy is the swiss army of the web server, and with the recent commercial license changes, it’s time to give it some love back.
I have several static websites, some generated with Hugo, some are plain HTML.
I wanted a small container, to run it inside a Kubernetes cluster, capable of pulling some git repos and serve them.
Caddy-git Caddy is already capable of that with the help of caddy-git unfortunately it is only working with ssh keys.
Context I wanted to blog about this for years: how to connect to a Kubernete’s loadbalanced service?
How to deal with disconnections/re-connections, maintenance? What about gRPC specifically?
The answer is heavily connected to the network stack used by Kubernetes, but with the “Mesh Network” revolution, It’s not always clear how it works anymore and what the options are. How it works First I recommend you to watch this great yet simple video: Container Networking From Scratch, then the Services clusterIP documentation.
Following my recent blog post on setting up a dev environment in Kubernetes, here are some tips to use Traefik as a gRPC load balancer.
Traefik can be used on the edge and route incoming HTTP traffic to your Kubernetes cluster, but it’s also supporting gRPC.
gRPC Load Balancing with Traefik Here I have a gRPC service I want to expose on the edge.
apiVersion: v1 kind: Service metadata: name: myapp labels: name: "myapp" type: "grpc" spec: ports: - port: 9200 name: "grpc" targetPort: grpc protocol: TCP selector: app: "myapp" clusterIP: None Note the clusterIP: None, it’s a headless service.
Introduction When starting on a new project or prototyping on a new idea, I find myself doing the same tasks again and again. Thanks to Kubernetes it’s possible to setup a new env from scratch really fast.
Here is a quick setup (mostly notes) to create a dev environment using Minikube and the workflow I’m using with it.
Not knowing in advance where this future project will be hosted, I try to stay platform agnostic.
I needed a reason to use the new Go 1.11 Wasm port for “real”.
To make it short, it compiles Go code to Wasm binary format for a virtual machine running in web browsers.
I’ve always needed a debug tool to display S2 Cells on a map for different shapes, some online tools already exist:
s2map.com unfortunately the backend is often/currently dead. regioncoverer which doesn’t allow polygons. I’ve planned for a Qt Go app or a QGIS plugin with C++ bindings to Python but to ship those modules would be a nightmare.
This is my journey building an open source car system with Go & Qt, rear camera, live OpenGL map …
Cross compilation In Part I, I had to patch qtmultimedia for the camera to work, but Qt compilation is resource hungry, same goes for the osrm compilation, the memory of the Raspberry Pi is too small.
I had to to set up a cross compilation system in my case for armv7h.
At first I needed a car rear camera, one thing led to another…
My Car, from 2011, only has an LCD display and no rear camera, so I bought a PAL rear camera, we passed some cables from the rear window to the front then everything begun.
Here is my journey to transform my car into a modern system running on RPi3 (a never ending project).
Hardware I’m using an Rpi3 (old model).
Having multiple clients to handle multiple networks is a mess, especially the Slack client which is really heavy and annoying.
Slack is deprecating its IRC gateway interface on May 15h 2018.
Bitlbee is an IRC server working as a gateway to different IMs.
Optionally Bitlbee can be compiled with LibPurple to support even more networks, like Slack and Hangouts.
Here are some notes for Slack, Facebook and Hangouts to be enabled with Bitlbee.
Google is working again on S2 a spatial library !!!
And they even have created a website to communicate about it s2geometry.
The C++ port contains a Python Swig interface.
I’ve been using an unofficial Python port with Jupyter for years now things are way more simpler.
If you are on Arch I’ve create a package, simply install AUR s2geometry-git
First we want a clean Jupyter install from scratch:
virtualenv3 ~/dev/venv3 source ~/dev/venv3/bin/activate pip install jupyter pip install cython pip install numpy pip install matplotlib scikit-learn scipy Shapely folium geojson Cartopy cp /usr/lib/python3.
One year ago I’ve started to collect temperature from my house using Acurite sensors.
These sensors are not too expensive and good quality but the “base” aka the radio receiver connected to internet is costly and totally closed, it’s sending your data to the Cloud™, it’s not just Acurite, all those “IOT” devices are generally poor on the software side.
Receiving radio data Most of these sensors have their protocols already reverse engineered you only need the radio receiver part.
PacBSD is a FreeBSD kernel/world with a PacMan Arch package manager and an optionnal OpenRC init system.
In short ZFS, DTrace and the FreeBSD kernel but the simplicity of Arch for packages management but the Gentoo init.
It’s experimental, uncompleted, unfinished, lacks proper documentations but it works and could be/should be the solution we are waiting for :).
Here is some notes on installation (in QEMU), note that it slightly diverges from the official install since it’s using a whole ZFS disk, so no GPT.
I’ve got an Asus C301S at work, it’s a Chromebook with Chromeos.
I like those little laptops, for the price it’s actually a very good little machine.
ChromeOS is responding very well, ssh and Chrome are working too.
But I often need more, like X11 forwarding or offline coding …
You will see the C301SA is marked as a C300SA internally.
Here are the steps to install Arch Linux on it, do it at your own risk, you can brick your computer, you will need an external USB keyboard.
I’ve been a long time UNIX user, ditched Microsoft back in the 90s for FreeBSD, Solaris and Linux on the desktop, but when Apple released MacOS X, I’ve used it as a workstation.
For the last years I’ve used Linux desktops but not on my main computer, today here I am switching back to Linux.
This post is not about the reasons I’m switching, they are simple.
My typical work day is mostly about parsing giant files, running VM and Dockers, coding in Go and not about developing for iOS anymore.
There are a lot of different solutions when it comes to collecting metrics, I found myself happy with this hybrid solution.
Telegraf is an agent written in Go for collecting metrics from the system it’s running on.
It’s developed by Influxdata the people behind InfluxDB, but Telegraf has a lot of outputs plugins and can be used without InfluxDB.
Many different platform (FreeBSD, Linux, x86, Arm …) are offered and only one single static binary (Thanks to Golang) is needed to deploy an agent.
If you are following Go development you probably know that:
Go 1.7 moves the golang.org/x/net/context package into the standard library as context, Yeah !
Unfortunately it won’t work for everything, I’ve spent some time understanding this one.
For example if you are using gRPC you can hit this problem, here is an interface generated by gRPC:
type APRSServer interface { GetPastMessages(context.Context, *Point) (*ARPSMessages, error) } But when compiling:
/main.go:153: cannot use &s (type *Server) as type protorpc.
Go Mobile can generate native framework for iOS and Android using Go code, I was curious what could be achieved with it.
Most tutorials are Hello world and I wanted to test it with real code.
You can use it to generate a full app only using Go code, but I’m only interested by the bindings part (SDK applications), using a native ObjC/Swift app calling Go code.
I’m using some existing Go code regionagogo, (a geofence database), moderately complex since it uses BoltDB and Google S2 library.
I’ve been using gRPC at work and in several personal projects for months and happy with it, but when it comes to load balancing gRPC does not come with batteries included.
For a long time the only document was the Load Balancing draft in the gRPC repo, the clients should implement a Picker interface to know about the servers, so the pooling and controling the load were handled by the clients.
I have found the right setup to stream in 1080p from a Raspberry Pi using the camera to TwitchTV while injecting audio on the fly!
Create an account on Twitch and grab you stream key in the Dashboard.
This stream.sh script will create a FIFO start rtl_fm at freq 162.550M to listen to Canada weather bulletin (use your local NOAA channel) and inject and encode the audio to the existing h264 stream from the camera then stream it to twitch using rtmp.
I’ve been using Jetbrains editor (the free Idea community edition) or Pycharm with the Go plugins and very happy with this setup, the editor is providing some realtime linting but I was missing gometalinter.
First install gometalinter
go get -u github.com/alecthomas/gometalinter gometalinter --install --update To add support inside Jetbrains editors use the External tools feature.
In Preferences > Tools > External Tools, add a configuration.
Set the Program path to your $GOPATH/bin/gometalinter
If you read this blog, you know I’ve recently released a project called regionagogo, a geo shape lookup database, described in this blogpost.
It uses the current Go S2 implementation, which is not yet as complete as the C++ implementation, for example the region coverer of a shape does not really compute cell around the shape but around the bounding box instead.
Using the shape of the polygon makes the covered cells more precise and smaller, resulting at the end to less PIP tests which are costly.
On a previous post, I’ve described how to use the S2 geo library to create a fast geo database, but it was to store locations (points) and only to perform range queries, a complete geo database would have regions/polygons queries.
Looking for a solution I had this need: querying for the countries or subregions of hundreds of coordinates per second, without relying on an external service.
One solution, using my previous technique, could have been to store every cities in the world and then perform a proximity query around my point to get the closest cities, but it works only in populated area and it’s only an approximation.
Six months ago, I wrote on this blog about Geohashes and LevelDB with Go, to create a fast geo database.
This post is very similar as it works the same way but replacing GeoHashes with Google S2 library for better performances.
There is an S2 Golang implementation maintened by Google not as complete as the C++ one but close.
For the storage this post will stay agnostic to avoid any troll, but it applies to any Key Value storages: LevelDB/RocksDB, LMDB, Redis…
I’m happy to announce a new side project: MyAPRS, a modern iOS APRS application, for radio amateur enthusiasts.
I’ve already mentioned APRS on this blog, it will mainly be useful for radio amateurs but can be interesting to RTL-SDR listeners too.
The application is built around LevelDB and geo hashing as mentioned in this post blog, it’s a lot faster than using SQLite especially on iOS, SatSat is still using the SQLite cities lookup and you can compare it’s terribly slow.
FreeBSD is now fully supported on the Raspberry Pi2, makes it a fun small computer to experiment with BSD.
If you have a Raspberry Pi 1, you can simply install 10.2-RELEASE image.
For Raspberry Pi 2, you need 11.0-CURRENT which is the development branch, images can be found here.
dd the image as usual to a SD card, it will be auto resized at first boot. (See growfs_enable="YES") in rc.conf.
I’ve ever dreamed of space & satellites, it turms out you can received pictures from them.
After getting my radio amateur license in the US, I’ve discovered there was some satellites dedicated to radio amateurs but also some weather satellites from the late 90s still working and capable of sending pictures from the space like this one NOOA-15.
SDR You don’t need expensive hardware anymore thanks to the SDR movement Software defined radio and some great developers, a simple 20$ USB key and some pratices are good enough to make it work.
You probably have heard of LevelDB it’s a blazing fast key value store (as a library not a daemon), that uses Snappy compression.
There is plenty of usages for it, the API is very simple at least in Go (I will be using Goleveldb).
The key is a []byte the value is a []byte so you can “get”, “put” & “delete” that’s it.
I needed a low memory low cpu system that could collect millions of geo data and query over them, Geohash has an interesting property you can encode longitude and latitude into a string : f2m616nn this hash represents the lat & long 46.
In my neighborhood, I’m experimenting to give free access to some services, not the full internet but a full access to Wikipedia, maps…
Here are some tips do to the same.
Getting access to the internet may be crucial for our lives, but the commercial providers are here to make money out of it. They don’t event provide disasters nor minimum safety access.
Sometimes even in normal condition, while traveling your roaming will cost you hundreds just to get access to a map or Wikipedia.
I’ve recently published StatGo, it gives you access to your operating system metrics like free memory, used disk spaces …
It’s a binding to the C library libstatgrab, a proven stable piece of code that works on many different systems, FreeBSD, Linux, OSX …
It’s very simple to use:
s := NewStat() c := s.CPUStats() fmt.Prinln(c.Idle) 98.2 Feel free to contribute, it may need some improvement but it’s working I’m using it in a small metrics web server to monitor small network of servers.
I’ve always developed my own blog system, that’s a good way to learn a new langage.
But having to maintain a working server or hosting is no fun, there are some solutions like Jekyll or Hugo they generate static web pages based on some Markdown files you wrote.
As it’s just basic html files, they can be served by Github gh-pages. It opens the door to blogging from anywhere without internet connection or your own laptop, just write some Markdown then publish to github later or event edit your new blog post from the Github editor.
This blog is running Hugo with an auto deploy via Wercker and hosted on Github Page. Take #2
Previous blog was hosted on Google App Engine with a Python blog system, to get the previous articles, I had to run in a small data migration.
Make a backup from GAE admin web interface: Go to Datastore admin and backup your entity mine was Post and then backup to blobstore, go to Blob Viewer and download your file named around datastore_backup_datastore_backup_2015_08_02_Post-157413521680733022360302ADC43E4-output-1-attempt-1
This is a 10 minute tutorial to set up an InfluxDB + Grafana with Go on your Mac, but should work with minor modifcations on your favorite Unix too, it assumes you already have a working Go compiler.
InfluxDB is a database specialized into time series, think store everything associated with a time, makes it perfect for monitoring and graphing values. Grafana is a js frontend capable of reading the data from InfluxDB and graphing it.
Today I’m releasing Gozim a side project written in Go.
It’s a set of tools to serve ZIM files, (compressed copy of Wiki articles), use it to run your full copy of Wikipedia off the grid.
It runs great on a small computer as the Raspberry Pi or your own laptop.
It could be a solution to give access to knowledge in countries without stable internet connections.
Airspy is an SDR with amazing specs, but drivers are slowly coming to your prefered os.
This apply to Arch but should apply to any recent Linux.
I’ve first compiled libairspy but always had the error AIRSPY_ERROR_NOT_FOUND and "usbfs: interface 0 claimed by airspy while 'airspy_info' sets config #1"
Since Linux 3.17 comes with an airspy v4l autoloaded driver making impossible to use it with libusb: no airspy_info and no gqrx.
First you need to create a VirtualBox FreeBSD install using a 10G qcow format, use an SCSI controller for the install as the disk will be visible as da0 inside GCE.
On FreeBSD 10.1 I had to load virtio manually, so set this in /boot/loader.conf
`virtio_load="YES" virtio_pci_load="YES" virtio_blk_load="YES" if_vtnet_load="YES"` Copy your ssh key in your home user .ssh/authorized_keys, be sure to be in the wheel group.
On a Mac you need to install GNU tar (brew install gnu-tar), shutdown your VirtualBox vm and upload your image to GCE
APRS is a tactical digital communications system used between amateurs radio, to exchange positions & messages, here I blog my experience decoding/encoding APRS with a small Arduino as it may help some of you too.
Some transceivers are incorporating this functionalities but most of them don’t, a lot of new technicians start with cheap Baofeng radios (30$) which don’t provide advanced functionnalities but here is a way to solve that.
When I was a young child, I remember listening to an old radio receiver with my grandfather, looking for morse transmission.
30 years later, I take the opportunity to get my radio amateur license in the US, it was not difficult (Technicial license is easy), especially cause US radio amateurs are using the metric system (almost all the time …), the only difficulties were to learn some terms and simple formulas from french to english and to know some parts of regulation by heart (I have never been able to learn by heart).
FreeBSD 10 is out and it’s time to replace your Linux boxes 
SC gen 2 is a VIA U2250 with 2Gb memory.
Start the rescue shell in amd64 12.04 Ubuntu, connect to the box via SSH with the temporary password
sudo -s cd /tmp wget http://ftp1.fr.freebsd.org/pub/FreeBSD/snapshots/ISO- IMAGES/10.0/FreeBSD-10.0-STABLE-amd64-20140216-r261948-disc1.iso apt-get update apt-get install qemu-kvm sudo qemu-system-x86_64 -no-kvm -hda /dev/sda -cdrom ./FreeBSD-10.0-STABLE- amd64-20140216-r261948-disc1.iso -net nic,model=e1000 -vnc :1,yourpassword -boot d This install qemu and run the FreeBSD installer from the downloaded CD.
FreeBSD images for arm are now built from the FreeBSD Foundation ! So it’s an easy process to get it on your Pi.
Download your image from the ftp repository
Insert a 4Gb or more SD card in your PC and copy the FreeBSD image into it, here are the commands for a Mac:
sudo diskutil list sudo diskutil unmountDisk /dev/disk1 sudo dd if=/Users/akh/Downloads/FreeBSD-10.0-STABLE-arm- armv6-RPI-B-20140127-r261200.img of=/dev/rdisk1 bs=1m sudo diskutil eject /dev/disk1 Boot your pi with the card and welcome to FreeBSD !
As an iphone developer contractor, I’ve released some applications on the Apple Store for my customers but not on my own.
Here is my 1st personal (30 hours) toy project: 7shape a 7 minutes workout training application, based on an [NYT blog](http://well.blogs.nytimes.com/2013/05/09/the- scientific-7-minute-workout/) post.
I’ve spent 20 hours on website release, marketing, 3D for the human trainer and application design, and last 10 hours to create the app and release it to Apple …
After my [Enhance your Python](http://blog.nobugware.com/post/2011/08/16 /enhance-your-python) post, which is my Python bible reference, I wanted the same for Golang:
Effective Go, write effective Go Go by examples, simple but useful examples in Go The Go memory model, Goroutines lock or not ? Things I Wish Someone Had Told Me About Go Go Object Oriented Design The sources for the standard packages are gold mine for best practices Race detector documentation, (>= 1.
As a day to day Python and iOS developer, I’m using a lot of tools on my Mac, here is a list that could help you too.
Textmate 2, Free, it’s funny to see that most people don’t know Textmate 2 is open source and totally free, this is a wonderful editor with completion and support for most languages.
SublimeText 2, free/pay, I’ve switched to Sublime mostly for the Golang support with Gosublime and not regreting it.
After 6 years of existence, where this blog was self hosted, it’s now running on Google App Engine with webapp2 Python framework.
It was previously a Django application, but no code has been reused, it’s a total rewrite (approx 5 hours).
The Google App Engine ecosystem is very good, all the tools are efficient and except a middle quality documentation, it was a pleasure to rewrite and transfer this blog.
^ up and ^ down : navigate methods
⇧ ⌘ up and ⇧ ⌘ down : switch from .h to .m
⇧ ⌘ ⌫ : go to last edit
⇧ esc : hide console/bottom view
⌥ ⌘ L : reindent code (^ i in xcode)
^ r : Run (⌘ + r in xcode)
^ tab : navigate files
⌘ o : open class
⌘ ⇧ o : open files
Python requests is the de facto HTTP package for Python, nice API, wonderful documentation.
I had the need to sign my requests and to change the header after the request was built, [here is hooks](http://docs.python- requests.org/en/v0.10.7/user/advanced/#event-hooks), simply call a function pre_request and your are done:
def auth_sign(req): user_id = '4f47a5f21aebcedff3001234' secret_key = 'C21LHQ5R4RVO2U2UMTEZ' timestamp = str(int(time.mktime(time.gmtime()))) string_to_sign = req.method + '\n' + user_id + '\n' + timestamp + '\n' + req.
I tried to use VIMAGE for jails, can be summarized as: independant network stack, firewalling, nat, a real loopback … for your jails
First I had pf in my kernel, it does not work with VIMAGE, it will kernel panic, (as module too), so remove it (I hope it will be solved soon).
I used the package from DruidBSD: vimage boot, and used the following config:
vimage_enable="YES" vimage_list="testjail" vimage_testjail_rootdir="/usr/jails/testjail" # root directory vimage_testjail_hostname="testjail" # hostname vimage_testjail_devfs_enable="YES" # mount devfs vimage_testjail_vnets="vtnet1" # network interfaces vtnet1 is a dedicated hard interface (from KVM) and will appears only in the jail after you start /etc/rc.
The MIT has created xv6: an operating system for learning purpose
This works better and takes less time to create a working environnement for xv6 on Mac Os X, than the recommandations proposed on Tools used in 6.828 simply run this
port install i386-elf-gcc port install qemu And change the Makefile like this:
-#TOOLPREFIX = i386-jos-elf- +TOOLPREFIX = i386-elf- -#QEMU = +QEMU = /opt/local/bin/qemu-system-i386 -CC = $(TOOLPREFIX)gcc +CC = $(TOOLPREFIX)gcc-4.3.2 [Here is a working gdb binary](http://dl.
It’s more a reminder to myself, gevent depends on libevent2 but the setup.py doesn’t correcty look for it, a simple solution:
export CFLAGS=-I/usr/local/include export LDFLAGS=-L/usr/local/lib pip install gevent change it for /opt/local/… if you are on OSX or you will get a bunch of errors
/Developer/usr/bin/llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -pipe -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c gevent/core.c -o build/temp.macosx-10.7-x86_64-2.7/gevent/core.o In file included from gevent/core.c:225: gevent/libevent.h:9:19: error: event.h: No such file or directory gevent/libevent.
Performance are really bad for FreeBSD in KVM, one solution is to use paravirtualized driver, virIO.
At the time of writing FreeBSD 9.0 is beta 3 and the last commit in the virtio project is 225710
cd /usr/src/sys/dev svn co http://svn.freebsd.org/base/projects/virtio/sys/dev/virtio cd /usr/src/sys/modules svn co http://svn.freebsd.org/base/projects/virtio/sys/modules/virtio cd /usr/src/sys/modules/virtio make install add this to /boot/loader.conf
virtio_load="YES" virtio_pci_load="YES" virtio_blk_load="YES" if_vtnet_load="YES" virtio_balloon_load="YES" # dmesg | grep -i virtio vtnet0: on virtio_pci0 virtio_pci1: port 0xc060-0xc07f irq 11 at device 4.
Gimp 2.7.3 has been released but no one ports it to OSX already here is an ugly working way.
EDIT: The macport is now up to date so no need to do this anymore !
It needs a lot of dependencies, get it via macports:
run port sync
Edit /opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics /gegl/Portfile
Change version to 0.1.6 and master_sites
version 0.1.6
master_sites ftp://ftp.gimp.org/pub/gegl/0.1/
remove the path line about atch-gegl-buffer-gegl-buffer.c
Edit /opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics /babl/Portfile change version and master_sites
Nohting new here but a list of what you should read to be a better Python developer, for intermediate and advanced Pythoners, in no particular order.
Building skills in Python a very complete language description Code like a Pythonista useful quick list of good practice. I’m reading it again and again to get it automatically The hidden features of Python question on Stackoverflow, a must read What is a metaclass Generator Tricks for Systems Programmers, A curious Course Coroutines and Concurrency and the Python yield keyword explained on Stackoverflow, all about yield Advanced Python: (or understanding Python) Video from Google Understanding Python decorators, then use it with Python Decorator Library Python progression path - From apprentice to guru, good advises to mastering Python PEP8 reading, and pylint usage Dive into Python 3 somes parts are boring but somes are greats Idioms and Anti-Idioms in Python, Python best practices Python Attributes and Methods The Hitchhiker’s Guide to Python A special mention for the Tornado web framework, the lack of documentation makes reading the source code a lot and it’s very didactic, Understanding the code inside Tornado is a very great blog post about asynchronous programming, the Python asyncore module and [An Introduction to Asynchronous Programming](http://krondo.
Since Sun’s killers euh Oracle shutdown OpenSolaris, FreeBSD is becoming more and more attracting with ZFS port, you should really give it a try (We are back baby).
Here is a fast installation of FreeBSD with a ZFS root.
Download http://mfsbsd.vx.sk/, a special iso image that will give you a ZFS on root FreeBSD with no pain.
Note that I’m using it over KVM on Gentoo: (kvm -hda /dev/vg0/freebsdvm_root -m 4096 -cdrom /opt/data/kvm/installer/mfsbsd-se-8.
Gentoo support for lvm root is still a pain in the ass, here is a working solution.
Assuming you have 2 disks same size to be mirrored.
You want a mirrored /boot and a big lvm.
Start a normal gentoo installation with this disks layout:
fdisk -l /dev/sda Device Boot Start End Blocks Id System /dev/sda1 * 1 31 248976 fd Linux raid autodetect /dev/sda2 32 242246 1945591987+ fd Linux raid autodetect fdisk -l /dev/sdb Device Boot Start End Blocks Id System /dev/sdb1 * 1 31 248976 fd Linux raid autodetect /dev/sdb2 32 242246 1945591987+ 83 Linux raid autodetect Set both disk the boot flags on the first partition and set all partitions to FD Linux raid autodetect.
Sparkfun and others sell a 434Mhz transmitter and a receiver for €2.88 and €3.61.
This version receives at 2400bauds but there is a 4800 bauds version.
Simply connect the transmitter to an arduino pin then your are done (almost).
My first try was to follow the example from sparkfun, which simply read a value from the receiver:
// read in values, debug to computer if (Serial.available() > 0) { incomingByte = Serial.
In a tag cloud !
This tag cloud has been generated with Wordle, the words are extracted from title’s posts for this services.
My facebook My twitter My Flickr My shared Google Reader articles My Tumbler My Picasa and this blog Parsed and sorted with Python via the friendfeed json API.
Data since 2008-11-19, commons french or english words removed, iphone word divide by 2 ;)
Thanks to Friendfeed service to aggregate my data, and no thanks to Facebook for killing it.
JMX had good intentions but the API is only implemented in Java, a Java product for Java, with no access to the outside world.
Jython was one of the solution but many times I had needed to call JMX from a CPython.
Jpype solved this problem and works extremely well.
Just install Jpype then try something like this:
The execution is really really fast, faster than a jvm run ?? and memory usage is really really slow !
For license reasons (god damn GPL), ZFS can’t be integrated into the Linux kernel, but there is a userland fuse version called [ZFS-FUSE](http://zfs- fuse.net/), so I tried to measure the fuse overhead vs others filesystems presents on my server.
This tests are not benchmarks, but just show that ZFS-FUSE is fast enough and seems to be stable (at least for my personal server)
ZFS with lzjb compression dd if=/dev/zero of=/testzfs/toto bs=2048 count=200000 409600000 bytes (410 MB) copied, 9.
In a production environment you could hit this one: DatabaseError: Invalid handle!
It seems to happen when Oracle is called with OCI interface (cx_Oracle) by multiple threads.
Yes using apache with MPM worker or mod_wsgi, will create threads in the same process, by default cx_Oracle is configured to be used without threads cause it will add a mutex and a performance hit.
The solution is to pass the threaded parameters to the connection string, so in Django settings just add:
I have an Nginx frontend to serv everything but confluence which was not happy with my SSLized conf, here is the solution !
This doc is related to confluence but will works with any java apps in a tomcat
First don’t use the standalone version of confluence (which is a Tomcat 5.5), use the EAR/WAR tar gz archive.
We need Tomcat 6 cause we will use a “Valve” [RemoteIPValve](http://tomcat.apa che.org/tomcat-6.0-doc/api/org/apache/catalina/valves/RemoteIpValve.html) that will check for a header (X-Forwarded-Proto) to see if the source request was secured by SSL.
Parce qu’Android est une plateforme avant d’etre un os pousse par un constructeur:
En chine il sort des modeles de smartphone, supportant Android, de tres bonne qualite, qui vont inonder les marches occidentaux dans les mois a venir.
Ces smartphones sont bien moins chers et le seul differenciateur grace a Android, ne sera plus que la finition, un detail dans un marche qui vise de plus en plus le grand public.
Some informations for iphone developers, and iphone owners. We have created a new iphone & ipod blog in french, with a dedicated developer category: tout sur l’iphone (everything about the iPhone).
I will continue to write iphone development related posts here, mostly traducted from tout sur l’iphone, but if you are a french speaker I recommend you to read the blog first and his developer part which will be bigger.
It was so long but python 2.6 is now in Gentoo stable, here is how to upgrade.
First emerge –sync your ports tree (as of 31st July 2009).
Then update your ports _emerge -upvD world _remove -p when ready.
When emerging python-2.6.2 it will become the main python, as you can see with eselect python list.
So you only have to rebuild every ports that rely on python, simple ? Yes with python-update
After years of pain playing with Solaris 10 Jumpstart’s package clusters, I took some time to build an ultimate install profile for Solaris 10.
The available packages clusters are :
SUNWCrnet is Reduced Network Support Software Group. -> lack of everything, from bash to bzip SUNWCreq is Core System Support Software Group. -> lack of bash, manpages… SUNWCuser is End User Solaris Software Group. -> include CDE Desktop, Mozilla, etc SUNWCprog is Developer Solaris Software Group.
Jira is a nice product for issue tracking linked to a SCM repository, yes it’s not free software but they provide a 5$ starter license for 5 users.
But Jira lacks of a part that trac is doing very well, source browser, in facts Atlassian provides one: Fisheye but it’s really expensive
Simply go to your Jira Administration, on the left click on Subversion Repositories (this menu appears after the installation of the subversion’s plugin).
Using mercurial for the beginner may sounds scarry here are fast tips
Edit ~/.hgrc
This is a Mercurial configuration file. [ui] username = Your Name
#enable ssh compression ssh = ssh -C
[extensions]
enable hg convert to import you old svn repository hgext.convert=
#enable hg glog command hgext.graphlog =
enable color diff, need mercurial >=1.1 color=
enable visual filemerge on OsX [merge-tools] filemerge.executable=opendiff filemerge.args=$other $local -ancestor $base -merge $output filemerge.gui=True
When debugging, I often found that NSLog is really boring, here is an attempt to make it nicer:
`
NSLog(@"mycar: %@",myCar); NSLog(@" I'M HERE "); `
NSLog doesn’t tell you where the call was made (which file or which method), so you end with a lot of:
2009-03-11 22:30:53.789 ObjCTest[1565:10b] mycar: Porsche
2009-03-11 22:30:53.791 ObjCTest[1565:10b] I’M HERE
A better NSLog could tell us:
2009-03-11 22:32:25.823 ObjCTest[1581:10b] Car.m:32 -[Car init] I’M HERE AND I KNOW WHERE I AM
ZFS is all about performance (many levels of caching, pre-fetch, …) and memory consumption :-)
Here are my last links about ZFS [internals](http://src.opensolaris.org/source/xref/onnv/onnv- gate/usr/src/cmd/mdb/common/modules/zfs/zfs.c#333), it’s worth a read if you plan to use ZFS on large productions :
The slides of Adam Leventhal’s talk for the OpenSolaris Storage Summit : ZFS, Cache, and Flash
c0t0d0s0.org : a very good explanation of the ARC cache : most recently used pages, most frequently used pages and their ghosts lists Some insight into the read cache of ZFS - or: The ARC and the writing side
In NAT mode (the default one), virtualbox does not give you the possibility to directly connect to your guest os.
Here is how to configure your Virtualbox to simply ssh myguest
For example my guest is called “Solaris10u6”, configured to used e1000 card, the default in solaris configuration, (The host os is a Mac).
Type this command in terminal:
`VBoxManage setextradata Solaris10u6 “VBoxInternal/Devices/e1000/0/LUN#0/Config/ssh/Protocol” TCP
VBoxManage setextradata Solaris10u6 “VBoxInternal/Devices/e1000/0/LUN#0/Config/ssh/GuestPort” 22
VBoxManage setextradata Solaris10u6 “VBoxInternal/Devices/e1000/0/LUN#0/Config/ssh/HostPort” 2222 `
[Improving MapReduce Performance in Heterogeneous Environments](http://www.use nix.com/events/osdi08/tech/full_papers/zaharia/zaharia_html/index.html)
" MapReduce is emerging as an important programming model for large-scale data-parallel applications such as web indexing, data mining, and scientific simulation. Hadoop is an open-source implementation of MapReduce enjoying wide adoption and is often used for short jobs where low response time is critical. Hadoop’s performance is closely tied to its task scheduler, which implicitly assumes that cluster nodes are homogeneous and tasks make progress linearly, and uses these assumptions to decide when to speculatively re-execute tasks that appear to be stragglers.
Pour changer le nom MyCompanyName dans votre source code: defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{ORGANIZATIONNAME = "Nobugware"; }'
⌘[ et ⌘] pour indenter a droite ou a gauche
⌃/ pour passer d’un champ a l’autre quand xcode vous propose la completion d’une methode avec plusieurs arguments (⌃⇧/ clavier fr)
⌥⌘↑ (alt shift curseur haut) passe du fichier .m au .h
⌘⇧D Open Quickly, permet d’ouvrir un popup de rechercher pour ouvrir rapidement un fichier