Skip to content

Instantly share code, notes, and snippets.

View baalexander's full-sized avatar

Brandon Alexander baalexander

View GitHub Profile
@baalexander
baalexander / avr_and_arduino.md
Last active January 28, 2022 12:10
The AVR and the Arduino

(Note: This was originally from my blog post on AlexanderRobotics.com, but I brought that site down and wanted to keep this post alive since it's referenced by Stack Overflow).

Introduction

The beauty of the Arduino lies in its simplicity. A look under the covers of the Arduino and its IDE, however, reveals a fascinating chipset and an open, extensive toolchain.

@baalexander
baalexander / ros_commands.bash
Last active December 18, 2015 20:59
Useful ROS commands
# Check what a depend [package](http://ros.org/wiki/catkin/package.xml) (build_depend, run_depend, etc.) resolves to in your system package manager.
rosdep --rosdistro <release> resolve <name_of_package>
# Example
rosdep --rosdistro groovy resolve usb_cam # resolves to "ros-groovy-usb-cam"
@baalexander
baalexander / transformations.py
Created March 22, 2013 22:03
Euler to Quaternion transformation
from tf import transformations
# Docs for transformations.quaternion_from_euler
# You can get docs with transformations.quaternion_from_euler? and enter
#ai, aj, ak : Euler's roll, pitch and yaw angles
#axes : One of 24 axis sequences as string or encoded tuple
#q = quaternion_from_euler(1, 2, 3, 'ryxz')
#numpy.allclose(q, [0.310622, -0.718287, 0.444435, 0.435953])
transformations.quaternion_from_euler(0, 0, -1.550)
@baalexander
baalexander / npm_commands.bash
Last active September 27, 2015 00:07
Useful commands for NPM
# Test a package locally before publishing to NPM:
# Install the package in the global space
npm install . -g
# Package should show up in list
npm ls -g
# Can view contents of the installed package with
ls ~/.npm/<package name>
# Publish a package to NPM
# Inside the root directory of the package
@baalexander
baalexander / git_commands.bash
Last active September 24, 2015 15:08
Useful git commands
# Sorts users by number of commits
# Example output:
# 85 baalexander
# 59 elaw
# 58 jsmartt
# See https://github.com/blog/766-jeff-king-peff-is-a-githubber
git log --pretty=format:%aN | sort | uniq -c | sort -rn
# Alternative
git shortlog -sn