Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
TARGET_PKG=$1
remote_branch_summary() {
target=$1
cd $(rospack find $target)
if git rev-parse --git-dir > /dev/null 2>&1; then
echo "## $target branch is $(git branch | sed -n -e 's/^\* \(.*\)/\1/p')"
echo "## $target git status"
function dropbox-share() {
target=$(md5sum $1 | cut -f1 -d ' ').${1##*.}
cp $1 ~/Dropbox/Public/tmp/$target
echo -e "File is available on $fg[cyan] $(dropbox puburl ~/Dropbox/Public/tmp/$target)$reset_color"
echo -e $'\U1F61D' $'\U1F61D' $'\U1F61D' $'\U1F61D'
}
\begin{matrix}
a &=& b \\
c &=& d
\end{matrix}
e^{ \pm i\theta } = \cos \theta \pm i\sin \theta
@garaemon
garaemon / install_ffmpeg_ubuntu.sh
Created September 11, 2015 05:18 — forked from xdamman/install_ffmpeg_ubuntu.sh
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
set -e
BASE_DIR=$HOME/prog
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev checkinstall
@garaemon
garaemon / camera_info.yaml
Created September 10, 2015 05:17
multisense camera parameter
header:
seq: 10128
stamp:
secs: 1441862200
nsecs: 807214000
frame_id: /left_camera_optical_frame
height: 544
width: 1024
distortion_model: plumb_bob
D: [-0.20831339061260223, 0.11341656744480133, -0.00035378438769839704, -1.746419547998812e-05, 0.013720948249101639, 0.0, 0.0, 0.0]
@garaemon
garaemon / matplotlibrc
Last active August 31, 2015 16:47 — forked from huyng/matplotlibrc
my default matplotlib settings
### MATPLOTLIBRC FORMAT
# This is a sample matplotlib configuration file - you can find a copy
# of it on your system in
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it
# there, please note that it will be overridden in your next install.
# If you want to keep a permanent local copy that will not be
# over-written, place it in HOME/.matplotlib/matplotlibrc (unix/linux
# like systems) and C:\Documents and Settings\yourname\.matplotlib
# (win32 systems).
#!/usr/bin/env python
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.mlab as mlab
import math
import sys
if len(sys.argv) != 3:
print "plot_gaussian.py mean variance"
child_process = require 'child_process'
# put this script under hubotdir/scripts
module.exports = (robot) ->
robot.respond /eval\s+(.*)$/i, (msg) ->
sexp = msg.match[1]
child_process.exec "sbcl --noinform--quit --eval \"(print #{sexp})\"", (error, stdout, stderr) ->
if !error
output = stdout+''
@garaemon
garaemon / aa.py
Last active August 29, 2015 14:27
#!/usr/bin/env python
import os
import sys
import textwrap
import subprocess
TEXT="""
___________
| |. |
(| (=) |. |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
TEXT="""
____________ .-----------------------------
| |。 | / Hack Hack Hack!
(| (二) |。 | <
|________|。 | \._____________________________
(___) ∧__---------|
|| ,<| o |___| |