Skip to content

Instantly share code, notes, and snippets.

Avatar

Wayne E. Seguin wayneeseguin

  • http://starkandwayne.com/
  • Buffalo, NY
View GitHub Profile
@wayneeseguin
wayneeseguin / bibtex.png
Created Mar 29, 2018 — forked from maxogden/bibtex.png
How to make a scientific looking PDF from markdown (with bibliography)
@wayneeseguin
wayneeseguin / AGPS.md
Created Jan 24, 2017 — forked from veproza/AGPS.md
Getting u-blox MAX-7C GPS to work with Assisted A-GPS
View AGPS.md

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

View gist:1226403
# bash based sh version
# partition for swap
if [[ "${MACHTYPE%%-*}" == 'x86_64' ]] # where was '$(arch)' comming from?
then
SWAPSIZE=$[$(free -m | awk '/^Mem:/{print $2}')*2]
if (( SWAPSIZE > 4096 ))
then
SWAPSIZE=4096
View exec
#!/bin/bash
exec /usr/local/rvm/bin/rvm 1.9.2 exec god -D
@wayneeseguin
wayneeseguin / bdsm-install-head.sh
Created Aug 8, 2011
bash script to install bdsm
View bdsm-install-head.sh
#!/bin/bash -e
if ! command -v git > /dev/null
then
echo "git is required in order to install the latest development BDSM version."
echo "Please install git ( http://git-scm.com/ ) and then try again."
fi
if (( UID == 0 ))
then
@wayneeseguin
wayneeseguin / bdsm-test.sh
Created Aug 3, 2011 — forked from adrianrf/bdsm-test.sh
bdsm-test.sh script as I try out BDSM
View bdsm-test.sh
#!/usr/bin/env bdsm
modules bdsm/filesystem # We're going to use the system module.
if file_is_nonempty "$HOME/.bashrc" # Provided by the filesystem module
then
log "$HOME/.bashrc is nonempty! " # log() is provided by logging module
else
log "$HOME/.bashrc is empty! "
fi
@wayneeseguin
wayneeseguin / rvm-empty-gems.sh
Created Aug 2, 2011 — forked from DAddYE/rvm-empty-gems.sh
Fast way to empty global gemset
View rvm-empty-gems.sh
#!/bin/bash -e
#
# This script will empty all RVM default gemsets in parallel.
#
rubies=($(rvm list strings))
echo "Emptying default gemsets for rubies: ${rubies[*]}";
for ruby in "${rubies[@]}"
View date_range.bash
#!/bin/bash
date_range() {
# Output list of dates from $1 to $2
}
for d in $(date_range 2011-01-01 2011-02-01) ; do
my_command $d
done
@wayneeseguin
wayneeseguin / template_.conf
Created May 30, 2011 — forked from mpapis/template_.conf
templates on bdsm
View template_.conf
a={{a}}
b={{b}}
c={{c}}
d={{d}}
e={{e}}
@wayneeseguin
wayneeseguin / gist:959068
Created May 6, 2011 — forked from iande/gist:959065
First Stab @ package_error
View gist:959068
package_error()
{
local _message=$1
if [[ -z "${_message}" ]]
then
fail "Cannot print a package error as no message was provided."
fi
local _log=$2