Skip to content

Instantly share code, notes, and snippets.

View btv's full-sized avatar

Bryce Verdier btv

  • Amsterdam, Netherlands
View GitHub Profile
@btv
btv / confused.rs
Created August 27, 2016 08:39
I'm trying to push a pointer back to dst in the base64_decode function.
extern crate libc;
extern crate rustc_serialize;
use libc::{size_t, c_void, c_char};
use std::{slice, ptr, iter, str};
use std::ffi::{CString, CStr};
use rustc_serialize::base64::{ToBase64, FromBase64, STANDARD};
//to copy

Keybase proof

I hereby claim:

  • I am btv on github.
  • I am louiscipher (https://keybase.io/louiscipher) on keybase.
  • I have a public key whose fingerprint is 2FB1 4D42 1972 D6D9 0064 FDDF 3BA2 FE3B CEEC 01B0

To claim this, I am signing this object:

[alias]
# to emulate hg rollback style functionality. Will always undue last
# commit.
rollback = reset --hard HEAD@{1}
@btv
btv / gist:932742
Created April 20, 2011 20:23
Show git branch in bash prompt
# Show the git branch in the prompt
PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
#this also works for SVN version numbers & HG branches too.