Skip to content

Instantly share code, notes, and snippets.

View jmeridth's full-sized avatar
:shipit:

Jason Meridth jmeridth

:shipit:
View GitHub Profile
@jmeridth
jmeridth / first_down.py
Last active April 21, 2024 16:55 — forked from PatrickHallek/dwm1001-localization.py
code and setup to test 3 anchors and 1 tag decawave boards. Used Raspberry Pi 3B+
import json
import redis
import serial
import sys
import time
from art import text2art
if len(sys.argv) == 1:
print("Please provide a numeric value for the first down")
# create the shared session:
tmux -S /tmp/pair
# fix perms (inside the session):
chmod 777 /tmp/pair
# others connect with:
tmux -S /tmp/pair a

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

If you are using vagrant, you probably-statistically are using git. Make sure you have its binary folder on your path, because that path contains 'ssh.exe'.

Now, modify C:\vagrant\vagrant\embedded\lib\ruby\gems\1.9.1\gems\vagrant-1.0.3\lib\vagrant\ssh.rb to comment out the faulty Windows check and add a real SSH check:

# if Util::Platform.windows?
  # raise Errors::SSHUnavailableWindows, :host => ssh_info[:host],
                                       # :port => ssh_info[:port],
                                       # :username => ssh_info[:username],
 # :key_path => ssh_info[:private_key_path]
#!/bin/bash
# Best use case is to create a file "update_local_db.sh" in your project folder and then call the command with bash update_local_db
function LastBackupName () {
heroku pgbackups | tail -n 1 | awk '{print $1;}'
}
# This part assumes you have a low limit on no. of backups allowed
old_backup=$(LastBackupName)
@jmeridth
jmeridth / gm.sh
Created October 12, 2011 12:56 — forked from jmarnold/gm.sh
The Good Morning Command
function rebasei {
branch_name="$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1 /')"
echo "Currently on $branch_name"
git checkout master
git pull origin master
git checkout $branch_name
git rebase -i master
}
function finishrebase {