Skip to content

Instantly share code, notes, and snippets.

View arrbee's full-sized avatar

Russell Belfer arrbee

  • San Francisco, CA
View GitHub Profile
@arrbee
arrbee / 360intro.md
Created January 5, 2015 22:41
Russell's 2015Q1 360 Feedback Template

I'd like to try gathering feedback using a start / stop / continue style. A lot has been written online about this simple model, but in case you haven't seen it before, the idea is to point out behaviors you have observed that the person should continue doing 👍, stop doing 👎, or new behaviors the person should start.

This is more effective if you focus on behaviors over attributes of the person; for example, "Continue writing summary emails each week for our project" or "Start opening a PR when you begin a new project" are more helpful than "Continue being an awesome teammate" or "Stop making me feel bad."

I will summarize and anonymize this feedback before delivering it, so please be candid with trying to help each other do our best work.

My intent is that this will only take 10-15 minutes of yo

@arrbee
arrbee / gist:4158350
Created November 28, 2012 01:08
libgit2 checkout scenarios

Key

  • B1,B2,B3 - blobs with different SHAs,
  • Bi - ignored blob (WD only)
  • T1,T2,T3 - trees with different SHAs,
  • Ti - ignored tree (WD only)
  • x - nothing

Checkout From 3 Iterators (2 not workdir, 1 workdir)

This email address should be the one associated with your GitHub account. If it is not, see this guide for help adding additional emails to your GitHub account. If you want to keep your email address hidden, this guide may be useful to you.

@arrbee
arrbee / gist:3147398
Created July 19, 2012 22:46
Better help text

On the GitHub side, everything will behave as if your new username had always been your name. All of your repositories will now belong to that new name and the old username will essentially no longer exist. This may take a few minutes to complete after your initiate the change.

This means that all references to the previous username, such as https://github.com/previoususername, will now give a 404 error. We cannot set up a redirect from the old username to the new one.

You will need to update the remotes in your local repositories to point to the new location. You can use git remote -v to see all the old remotes and look for references to your old username, then use git remote set-url <name> <new-url> to update them.

Your Git history is not affected and we should properly link commits to your new username so long as you don't also change your email address.

Related Documentation

@arrbee
arrbee / gist:2163858
Created March 22, 2012 20:36
Alternative rewrite for test_helpers.c:copy_file
int copy_file(const char *src, const char *dst)
{
git_buf source_buf = GIT_BUF_INIT;
git_file dst_fd;
int error = GIT_ERROR;
if (git_futils_readbuffer(&source_buf, src) < GIT_SUCCESS)
return GIT_ENOTFOUND;
dst_fd = git_futils_creat_withpath(dst, 0777, 0666);
@arrbee
arrbee / gist:2141997
Created March 20, 2012 22:34
Sample libgit2 test of commit header parsing
#include "clar_libgit2.h"
#include "repository.h"
#include "signature.h"
typedef struct {
const char *line;
const char *header;
} parse_test_case;
static parse_test_case header_passing_tests[] = {