Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am andrewseidl on github.
  • I am andrewseidl (https://keybase.io/andrewseidl) on keybase.
  • I have a public key whose fingerprint is 7E33 6EA3 B41A 2866 2BA5 A8EE 8FD8 092E AC25 D678

To claim this, I am signing this object:

# - Find the MAGMA library
# - Based on https://github.com/bravegag/eigen-magma-benchmark
#
# Usage:
# find_package(MAGMA [REQUIRED] [QUIET] )
#
# It sets the following variables:
# MAGMA_FOUND ... true if magma is found on the system
# MAGMA_LIBRARY_DIRS ... full path to magma library
# MAGMA_INCLUDE_DIRS ... magma include directory

https://www.atlassian.com/git/

For those of you new to git or just looking for a refresher, the link above is awesome. There are even a few places which relate git commands to their SVN equivalents.

Beyond that, here are some of my tips:

  • Force yourself to use git from the terminal. Sourcetree is great for getting up and running quickly, but you'll have a much easier time you understand what the commands do. Eventually the GUI just gets in your way.

  • Sync with the upstream/parent branch regularly. This will let you deal with conflicts as they happen, instead of having to fix everything at the end.

In the current directory, find all files ending in .(cpp|cu|glsl|h) that are not named *FontData* and are not in a path matching *thirdparty*. Run clang-format on each of these files, using the format specified in .clang-format.

Chrono-Parallel

Linux/GNU find:

find . \( -regex '.*\.\(cpp\|cu\|glsl\|h\)' ! -iname '*FontData*' ! -ipath '*thirdparty*' \) -exec clang-format -i '{}' \;

OSX/BSD find:

% ClangFormat All The Things % Andrew Seidl % 27 February 2015

ClangFormat All The Things

ClangFormat All The Things

ClangFormat

  • C/C++/ObjC source code formatter
@andrewseidl
andrewseidl / AsciiDocker.txt
Created April 10, 2015 07:01
Ascii Docker
## .
## ## ## ==
## ## ## ## ## ===
/""""""""""""""""""\___/ ===-
~~~ {~~ ~~~~ ~~~ ~~~ ~~ ~~ ~ / ===- ~~~
\ o __/
\____/ __/
\______________/
| |
clippy.cow from: https://gist.github.com/danopia/3550035
______________________________________
/ It looks like you're trying to run a \
\ container /
--------------------------------------
\ ___
\ / \
\ / \
/ \
@andrewseidl
andrewseidl / bullet.diff
Created April 29, 2015 19:41
Chrono/Bullet differences
Only in bullet-real: btBulletDynamicsCommon.h
Only in bullet-real: Bullet-C-Api.h
diff -r bullet-real/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h bullet-chrono/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h
51a52
> BARREL_SHAPE_PROXYTYPE, //***ALEX***
60a62,64
> // for 2d collision between polylines:
> ARC_SHAPE_PROXYTYPE, //***ALEX***
> SEGMENT_SHAPE_PROXYTYPE, //***ALEX***
diff -r bullet-real/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h bullet-chrono/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h
#!/usr/bin/env bash
# `hub` is GitHub's Hub: hub.github.com
# can be replaced with regular `git`, but must use full repository URLs
function initPaths {
mkdir -p merge && cd merge
hub clone projectchrono/chrono
hub clone projectchrono/chrono-parallel
}
@andrewseidl
andrewseidl / aws-arch-setup.txt
Last active October 17, 2015 07:10
Commands to install Yaourt and setup user access to Arch running on AWS
curl https://github.com/andrewseidl.keys >> ~/.ssh/authorized_keys
sudo pacman --noconfirm -Syyu
sudo pacman --noconfirm -S base-devel vim zsh wget yajl tmux mlocate
wget https://aur.archlinux.org/cgit/aur.git/snapshot/yaourt.tar.gz
wget https://aur.archlinux.org/cgit/aur.git/snapshot/package-query.tar.gz
tar xvf package-query.tar.gz
tar xvf yaourt.tar.gz
cd package-query
makepkg -i --noconfirm
cd ../yaourt