Skip to content

Instantly share code, notes, and snippets.

gebi /
Created Mar 26, 2021 — forked from veproza/
Getting u-blox MAX-7C GPS to work with Assisted A-GPS

Getting u-blox MAX-7C GPS to work with Assisted A-GPS

So you got your u-blox GPS and wired it up only to look at it struggling to get a valid fix? Under less than ideal conditions, it can take a better part of half an hour. That's because unlike your smartphone GPS, it doesn't have the luxury of having downloaded all the auxiliary navigation data (almanacs and the lot) out-of-band, via fast mobile connection. Instead it relies on the satellite's signal itself, which is being transmitted to you at meager 50 bits per second (I'm not missing "kilo" there, it's three orders of magnitude slower than your 2G GPRS connection).

Luckily, the u-blox receivers are fitted with what the company calls "AssistNow" capability and it does exactly the same thing your iPhone does - feeds the GPS with pre-downloaded almanacs, speeding up the acquisition process to mere seconds.

In principle, the process looks easy enough - we just need to download the data, and then push them to the receiver. Sadly, the AssistNow documentat

gebi /
Created Mar 5, 2021 — forked from bradfitz/
# Brad's el-ghetto do-our-storage-stacks-lie?-script
sub usage {
die <<'END';
Usage: -s <server[:port]> verify <file> -s <server[:port]> create <file> <size_in_MB> -l [port]
gebi / psql_internals_cheatsheet.sql
Created Mar 5, 2021 — forked from azet/psql_internals_cheatsheet.sql
PostgreSQL internals SQL collection
View psql_internals_cheatsheet.sql
# long running queries:
now() - pg_stat_activity.query_start AS duration,
FROM pg_stat_activity
WHERE (now() - pg_stat_activity.query_start) > interval '5 minutes';
## active queries and killing them:
View gitconfig
a = annex
sf = svn fetch
sr = svn rebase
sd = svn dcommit
s = status
st = status
sb = show-branch
b = branch
c = clone
gebi / google-chrome-anon
Created Nov 8, 2016
Start temporary google chrome instance
View google-chrome-anon
tmp_=$(mktemp -d --tmpdir google-chrome-anon-XXXXXXXXXX)
echo "private dir: " $tmp_
trap "{ rm -rf /tmp/$(basename $tmp_); exit 255; }" EXIT
nice -n5 google-chrome --user-data-dir=$tmp_
View es_index_maintenance.js
#!/usr/bin/env node
// Configuration
var argv = require('optimist')
.usage('Usage: $0 --prefix index_prefix [options]')
host: 'Elastic Search host',
port: 'Elastic Search port',
secure: 'Use secure Elastic Search connection',
View avcodec.c
#define __USE_GNU
#define _GNU_SOURCE
#include <pthread.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include "erl_nif.h"
#include "frog_draw.h"
View gist:16aa7bfeb189cd1f6604
### Keybase proof
I hereby claim:
* I am gebi on github.
* I am gebi ( on keybase.
* I have a public key whose fingerprint is 2779 5CE5 412C 409A B140 5897 6E30 2CF4 D98B 9702
To claim this, I am signing this object:
gebi / json_utils.go
Created Jul 30, 2013
http utils for protobuf/json
View json_utils.go
package main
import (
gebi / csv-test.go
Last active Dec 19, 2015
csv test progs in various languages
View csv-test.go
package main
import (