Skip to content

Instantly share code, notes, and snippets.

@andrewseidl
andrewseidl / Clang-format Comparison.md
Last active April 10, 2024 04:10
Clang-format style comparison

This is a comparison of the different formatting styles including with clang-format.

Generated via:

styles=( LLVM Google Chromium Mozilla WebKit )
for style in $styles
do
  clang-format -style=$style ChLcpIterativeAPGD.h > ChLcpIterativeAPGD.$style.h

done

  • update system
    sudo yum update
  • install xmonad, xmonad-contrib, xmobar
    sudo yum install xmonad ghc-xmonad-contrib{,-devel} xmobar
  • install cabal-install, for yeganesh
# Maintainer: Guillaume Horel <guillaume.horel@gmail.com>
pkgname='arrow'
pkgver=0.12.1
pkgrel=10
pkgdesc="A columnar in-memory analytics layer for big data."
arch=('x86_64')
url="https://arrow.apache.org"
license=('Apache')
depends=('boost-libs' 'protobuf' 'rapidjson' 'google-glog')
@andrewseidl
andrewseidl / recurse-includes.sh
Last active April 11, 2017 22:00
Given one header, recursively find all other files it #includes
#!/bin/bash
set -e
START="folly/SharedMutex.h"
ALL=$START
NEW=""
# could simplyify with `sort -t' ' -u`
while ! diff -q <(echo $ALL | tr ' ' '\n' | sort -u) <(echo $NEW | tr ' ' '\n' | sort -u) >/dev/null ; do

                 ##            .          
           ## ## ##           ==          
        ## ## ## ## ##       ===
     /""""""""""""""""""\___/ ===-
~~~ {~~ ~~~~ ~~~ ~~~ ~~ ~~ ~ /  ===- ~~~
     \       o            __/           
      \____/           __/
       \______________/
@andrewseidl
andrewseidl / ssh-copy-id
Created September 8, 2013 20:57
ssh-copy-id for systems that don't ship with it (MacOSX)
#!/bin/sh
# Shell script to install your public key on a remote machine
# Takes the remote machine name as an argument.
# Obviously, the remote machine must accept password authentication,
# or one of the other keys in your ssh-agent, for this to work.
ID_FILE="${HOME}/.ssh/id_rsa.pub"
if [ "-i" = "$1" ]; then
@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
#!/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 / 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