Skip to content

Instantly share code, notes, and snippets.

bobsomers /
Last active Mar 8, 2021
How to Install YouCompleteMe on Apple Silicon (M1 Mac) with C++ and Rust Completion

How to Install YouCompleteMe on Apple Silicon (M1 Mac) with C++ and Rust Completion

First, install native MacVim, Python, and LLVM:

arch -arm64 brew install llvm python macvim

Add configuration in your .vimrc to use Homebrew LLVM's clangd for C++ completion.

bobsomers / custom_sort.cpp
Created Aug 23, 2018
Example of using a custom sorting predicate function in C++
View custom_sort.cpp
struct Interval {
int start;
int end;
Interval() : start(0), end(0) {}
Interval(int s, int e) : start(s), end(e) {}
// Must return true if the first argument (a) should appear before the second argument (b).
bool interval_by_start(const Interval& a, const Interval& b) {
return a.start < b.start;

Keybase proof

I hereby claim:

  • I am bobsomers on github.
  • I am bobsomers ( on keybase.
  • I have a public key whose fingerprint is 251E 08D2 9A5B 3A96 A75F 359C 8DCC 7198 75B9 90CB

To claim this, I am signing this object:

bobsomers /
Last active Aug 30, 2019
Arch Linux on Linode with Full Disk Encryption
bobsomers / PKGBUILD
Created Jan 26, 2012
Updated PKGBUILD for pycuda-2011.2.2
# Maintainer: Stéphane Gaudreault <>
pkgdesc="Python wrapper for Nvidia CUDA"
arch=('i686' 'x86_64')
license=('MIT/X Consortium')
depends=('cuda-toolkit' 'python2-numpy' 'python2-pytools' 'python2')
bobsomers / gist:1451131
Created Dec 9, 2011
Biogpu example with arbitrary ranges.
View gist:1451131
import biogpu.correlation
# Pyroprints are defined as a list of lists. Each inner list is just a list of
# each dispensation value. Note that both sets of pyroprints you're comparing
# should have the same length for all their inner lists (i.e. they're all 104
# dispensations long. These are 32-bit floating point values.
# Here's a set of 3 pyroprints each with 3 dispensations.
A = [[1.0, 2.0, 3.0], # first pyroprint
[4.0, 5.0, 6.0], # second pyroprint