Skip to content

Instantly share code, notes, and snippets.

{
"always_show_minimap_viewport": true,
"auto_complete": false,
"bold_folder_labels": true,
"color_scheme": "Packages/Monokai++/themes/Monokai++.tmTheme",
"detect_indentation": true,
"draw_indent_guides": true,
"draw_minimap_border": true,
"font_face": "Hack",
"font_options":

Keybase proof

I hereby claim:

  • I am ozymandium on github.
  • I am rgcofield (https://keybase.io/rgcofield) on keybase.
  • I have a public key whose fingerprint is 49CB DDEA 21AB 3876 CA24 7481 B2AC F4C0 6F8C 7262

To claim this, I am signing this object:

#!/bin/bash
#Register your default SSH public key with Github
#usage:
# ./github_reg_key.sh <github_username>
#
curl -u "$1" \
--data "{\"title\":\"`uname -n`_`echo $USER`_`date +%Y%m%d%H%M%S`\",\"key\":\"`cat ~/.ssh/id_rsa.pub`\"}" \
https://api.github.com/user/keys
@ozymandium
ozymandium / install_transformations
Created September 7, 2015 00:28
Bash script that downloads and installs Christoph Gohlke's popular python transformations module
#!/bin/bash
tempfile="/tmp/transformations.py"
wget http://www.lfd.uci.edu/~gohlke/code/transformations.py -O $tempfile
echo "Installing to:"
for path in /usr/lib/python*; do
[ -d "${path}" ] || continue # skip any files in there
filen="${path}/transformations.py"
echo -e "\t${filen}"
cp $tempfile $filen
done
@ozymandium
ozymandium / bag2mat.m
Created June 3, 2015 02:37
MATLAB function to convert ROS bag files to MAT structures
function [data, fields, topics] = bag2mat(inp, map_topics, array_map, do_save)
% Convert ROS Bag files into MAT files
%
% This is really more of a wrapper for extractSingleFile. It does a little
% bit of checking to make sure we're all good, and will do whole
% directories at a time.
%
% USAGE:
% bag2mat('<folder_with_bag_files>')
% bag2mat('<some_file.bag>')
@ozymandium
ozymandium / milestone1.m
Created September 24, 2014 17:23
garret's matlab
clear all; close all; clc
% input
%% #1
data = {};
for k = 1:8
[data{k}.num, data{k}.txt, data{k}.raw] = xlsread('RyderCupData.xlsx',k);
end
scores_eur = zeros(12,10,3);
clear all; close all; clc
x = randn(2,3);
PN = cov(x'); % covariance in the navigation frame
error_ellipse(PN,'style','b');
axis equal;
hold on;
grid on;
@ozymandium
ozymandium / parse_novatel_data.py
Created September 26, 2013 21:15
MECH 6970 novatel parser
#!/usr/bin/env python2.7
"""This is one way of putting *.alog data into a *.mat, if you don't like the
script provided..."""
import os
import scipy.io as sio
alog_path = os.path.join(os.path.dirname(__file__), 'Novatel_Data_16_9_2013_____13_30_04.alog')
alog_file = open(alog_path, 'r')
mat_path = os.path.join(os.path.dirname(__file__), 'Novatel_Data__pyparsed.mat')
@ozymandium
ozymandium / russian_roulette.bash
Created July 31, 2013 17:58
Command line Russian Roulette
[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo *Click*
@ozymandium
ozymandium / find_text.bash
Created July 14, 2013 19:27
Recursively look through all files below current directory which match pattern for a given text, and return results with line numbers
grep -rni --include="*" search_string .