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>
This example shows how to setup an environment running Rails 3 under 1.9.2 with a 'rails3' gem set.
∴ rvm update --head
# ((Open a new shell)) or do 'rvm reload'
# If you do not already have the ruby interpreter installed, install it:
∴ rvm install 1.9.2
# Switch to 1.9.2-head and gemset rails3, create if it doesn't exist.
∴ rvm --create use 1.9.2@rails3
@wayneeseguin
wayneeseguin / bosh-create
Last active October 23, 2018 17:03
bosh-create {release,job(s),package(s),src(s)}
#!/usr/bin/env bash
#
# Usage:
# release <name>
# jobs <job name>...
# packages <package name>...
# src <src name>...
#
# This currently represents *binary* jobs by default.
# TODO: Add the concept of *script* jobs with the associated adjustments.
yum install -y kernel-devel zfs
fastestmirror
epel-release-7-2.noarch
does not update installed package.
Nothing to do
fastestmirror
zfs-release-1-2.el7.centos.noarch
does not update installed package.
Nothing to do
fastestmirror
[root@flocker-master ~]# flocker-deploy mongodb-deployment.yml mongodb-app.yml
Traceback (most recent call last):
File "/bin/flocker-deploy", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 3011, in <module>
parse_requirements(__requires__), Environment()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 626, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: setuptools>=1.4
#!/usr/bin/env bash
# Author: Wayne E. Seguin (wayneeseguin@gmail.com)
#
# I like the sound of 'work_on', however you can name this
# function anything that makes it easier for you to think.
#
work_on ()
{
# We are expecting project name to be the first parameter
@wayneeseguin
wayneeseguin / gist:1095634
Created July 20, 2011 18:51
My thought on improving Ruby construct end syntax.
# I have now programmed in a lot of languages, and one thing I can say for sure
# is that shell scripting does construct end styles very well.
#
# Example from http://redmine.ruby-lang.org/issues/5054
#
# This is indeed also one of my few personal issues with Ruby syntax, the end trail.
#
module MyModule
class MyClass
@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

while (( $# ))
do
parameter="$1" && shift
case "${parameter}" in
(-D|--debug)
set -x
;;
(-V|--verbose)
VERBOSE=true
SILENCE=""