Skip to content

Instantly share code, notes, and snippets.

View ben's full-sized avatar

Ben Straub ben

View GitHub Profile
@ben
ben / change_1core
Created March 21, 2012 03:37
Multi-cpu timing with libgit2 under MSVC
Microsoft (R) Build Engine version 4.0.30319.17379
[Microsoft .NET Framework, version 4.0.30319.17379]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 3/20/2012 8:30:54 PM.
1>Project "C:\Users\bstraub\libgit2\build\libgit2.sln" on node 1 (default targets).
1>ValidateSolutionConfiguration:
Building solution configuration "Debug|Win32".
ValidateProjects:
The project "INSTALL" is not selected for building in solution configuration "Debug|Win32".
@ben
ben / gist:4081592
Created November 15, 2012 21:57
libgit2 summit notes

Roadmap to 1.0

What does 1.0 mean?

  • Public API stability
  • Consistency
  • Backporting fixes to past release branches
  • Semantic Versioning
  • Certain set of functionality
  • Vision: make it easy to do interesting things with git
@ben
ben / Outline.md
Last active December 11, 2015 11:19
Resources from introductory class at PHP Benelux
#include "git2.h"
#include <stdio.h>
static void fetch_progress(
const git_transfer_progress *stats,
void *payload)
{
int fetch_percent =
(100 * stats->received_objects) /
stats->total_objects;
#include "test.h"
extern int foo(char c);
int bar(char c) {
return foo(c);
}
@ben
ben / 38859f2_32
Last active December 22, 2015 18:29
Libgit2 build results, before and after #1840
1>------ Build started: Project: libgit2_clar, Configuration: Debug Win32 ------
1> Building Custom Rule C:/Users/ben/Documents/GitHub/libgit2/CMakeLists.txt
1> CMake does not need to re-run because C:\Users\ben\Documents\GitHub\libgit2\build\CMakeFiles\generate.stamp is up-to-date.
1> Generating ../tests-clar/clar.suite
1> Written `clar.suite` (1235 tests in 205 suites)
1> precompiled.c
1> attr.c
1> attr_file.c
1> branch.c
1> buf_text.c
@ben
ben / .gitignore
Last active August 29, 2015 13:57 — forked from raylu/Makefile
*.pyc
*.un~
@ben
ben / gist:10672053
Created April 14, 2014 18:31
keybase.md
### Keybase proof
I hereby claim:
* I am ben on github.
* I am benstraub (https://keybase.io/benstraub) on keybase.
* I have a public key whose fingerprint is 2F50 F2DC FAF4 8271 F5FA F461 B815 AD70 262A E9FE
To claim this, I am signing this object:
@ben
ben / checklist.md
Last active November 21, 2015 04:46
After-hours switchover

Rolling forward

  • Set k8s load balancers to listen on ports 81 and 444:
    • welcome (a6478641c8f4411e599d106fa7745be6-898755358.us-west-1.elb.amazonaws.com)
    • huyang (a6442f4148f4411e599d106fa7745be6-1097607471.us-west-1.elb.amazonaws.com)
    • tenants (a6456bf648f4411e599d106fa7745be6-289499823.us-west-1.elb.amazonaws.com)
    • messaging (a518bc87b8f4411e599d106fa7745be6-242074411.us-west-1.elb.amazonaws.com)
    • huyangapi (ac85c06dd8ca111e599d106fa7745be6-165125648.us-west-1.elb.amazonaws.com)
  • pg_dump gridium from a k8s minion
  • docker-compose stop on docker1 and docker2
@ben
ben / bot.js
Created May 27, 2016 16:06
Something like Hubot, implemented on top of Botkit
require('dotenv').config()
var Fs = require('fs')
var Path = require('path')
var Botkit = require('botkit')
if (!process.env.SLACK_TOKEN) {
console.error('ERROR: this requires "SLACK_TOKEN" to be a valid Slack API token.')
process.exit(-1)
}