Skip to content

Instantly share code, notes, and snippets.

View wayneeseguin's full-sized avatar
🤪

Wayne E Seguin wayneeseguin

🤪
View GitHub Profile
@wayneeseguin
wayneeseguin / bibtex.png
Created March 29, 2018 15:33 — forked from max-mapper/bibtex.png
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
# Switch to Ruby 1.8.7
rvm use 1.8.7
# Print out the ruby version
ruby -v
# But the output of this is:
#
# $ ./tryrvm
# <i> Now using ruby 1.8.7 p249 </i>
@wayneeseguin
wayneeseguin / AGPS.md
Created January 24, 2017 17:10 — forked from veproza/AGPS.md
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

# 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
#!/bin/bash
exec /usr/local/rvm/bin/rvm 1.9.2 exec god -D
@wayneeseguin
wayneeseguin / bdsm-install-head.sh
Created August 8, 2011 01:11
bash script to install bdsm
#!/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 August 3, 2011 20:54 — forked from adrianrf/bdsm-test.sh
bdsm-test.sh script as I try out BDSM
#!/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 August 2, 2011 13:28 — forked from DAddYE/rvm-empty-gems.sh
Fast way to empty global gemset
#!/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[@]}"
#!/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 14:29 — forked from mpapis/template_.conf
templates on bdsm
a={{a}}
b={{b}}
c={{c}}
d={{d}}
e={{e}}