Skip to content

Instantly share code, notes, and snippets.

# NOTE: These instructions do not represent a robust, self-troubleshooting install; they
# are definitely not suitable for dumping to a giant script and running as one. If you
# use them, they should be run one at a time, with an eye out for errors or problems
# along the way.
#
# The #1 issue you are likely to encounter is with Homebrew or Python packages whose
# binary components link against system Python. This will result in runtime segfaults,
# especially in rviz. If you suspect this is occurring, you can attempt to remove and
# reinstall the offending packages, or go for the nuclear option--- empty your Cellar
# and site-packages folders and start over with brewed python from the beginning.
cd ~
echo "#Git completion setup" >> .bash_profile
# Enable tab completion
curl -O https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
echo "source ~/git-completion.bash" >> .bash_profile
# prompt setup
curl -O https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh
@rummanwaqar
rummanwaqar / Vagrantfile
Last active August 29, 2015 14:16
Vagrant file for STM32F4
# 1. Pull the image from the repository
#
# 1.1 Prerequisites:
#
# vagrant --version
# Vagrant 1.6.3 # Issues with version < 1.5.0
# # Install Vagrant by following instructions at https://www.vagrantup.com/downloads.html
#
# 1.2 Install software dependencies
#
@rummanwaqar
rummanwaqar / rat5-quirks.conf
Last active January 29, 2016 05:13
XConf for RAT5 Mouse (/usr/share/X11/xorg.conf.d/rat5-quirks.conf)
Section "InputClass"
Identifier "Mouse Remap"
MatchProduct "Saitek Cyborg R.A.T.5 Mouse"
MatchDevicePath "/dev/input/event*"
Option "AccelerationProfile" "1"
Option "ConstantDeceleration" "5"
Option "ButtonMapping" "1 2 3 4 5 6 7 8 9 10 11 12 0 0 0"
Option "ZAxisMapping" "4 5 6 7"
EndSection
@rummanwaqar
rummanwaqar / stm32_install.bash
Last active February 24, 2016 15:22
STM32 Setup
sudo add-apt-repository -y ppa:terry.guo/gcc-arm-embedded
sudo apt-get update -q
sudo apt-cache policy gcc-arm-none-eabi
# Remove the offical packages
apt-get purge -y binutils-arm-none-eabi gcc-arm-none-eabi gdb-arm-none-eabi libnewlib-arm-none-eabi
#install GNU ARM Embedded Toolchain
apt-get update -q && apt-get install -y build-essential unzip \
git binutils-arm-none-eabi \
gcc-arm-none-eabi libnewlib-arm-none-eabi \
# update
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install tmux build-essential
# ros install
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net --recv-key 0xB01FA116
sudo apt-get update
@rummanwaqar
rummanwaqar / EC2 Caffe
Last active October 15, 2016 01:59
Install Caffe on EC2
# ssh into the machine
ssh -i key.pem ubuntu@<ip>
# update the machine
sudo apt-get update && sudo apt-get upgrade -y
# essentials
sudo apt-get install build-essential git htop
# download and extract cuda
@rummanwaqar
rummanwaqar / ros-kinetic-opencv3
Created April 25, 2017 19:58
ldconfig add opencv3 from ROS
# add ros libraries to ldconfig
sudo sh -c "echo '/opt/ros/kinetic/lib' >> /etc/ld.so.conf"
# rebuild ldconfig
sudo ldconfig
# check if it worked
ldconfig -p | grep opencv3
@rummanwaqar
rummanwaqar / clone_organization.sh
Created May 2, 2017 05:59
Clone all github repos
function git.github.clone.organization() {
if [ $# -ne 0 ]
then
mkdir $1
cd $1
curl -s https://api.github.com/orgs/$1/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
else
echo "git.github.clone.organization <organization>"
fi
}
### METHOD 1
# install wpa tools
sudo apt install wpasupplicant
# get essid of network
sudo iwlist scan
# create wpa configuration file
wpa_passphase ESSID > wpa.conf # type password