Skip to content

Instantly share code, notes, and snippets.

@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

                 ##            .          
           ## ## ##           ==          
        ## ## ## ## ##       ===
     /""""""""""""""""""\___/ ===-
~~~ {~~ ~~~~ ~~~ ~~~ ~~ ~~ ~ /  ===- ~~~
     \       o            __/           
      \____/           __/
       \______________/
@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
# 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')
  • update system
    sudo yum update
  • install xmonad, xmonad-contrib, xmobar
    sudo yum install xmonad ghc-xmonad-contrib{,-devel} xmobar
  • install cabal-install, for yeganesh
@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