Skip to content

Instantly share code, notes, and snippets.

View minrk's full-sized avatar

Min RK minrk

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env ruby
# like `git checkout -`, but ignore master because it's never what I want
# I use this as `alias c-=git-last-branch`
skip = [`git rev-parse --abbrev-ref HEAD`.strip, "master"]
(1..100).each do |n|
b = `git rev-parse --abbrev-ref @{-#{n}}`.strip
if b.empty? or skip.include? b
next
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include "zmq.h"
void checkrc(int rc, const char * msg) {
if (rc == 0) return;
printf("%s failed: %s\n", msg, zmq_strerror(zmq_errno()));
exit(1);
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
% extend the article template
((* extends "article.tplx" *))
% disable input
((* block input scoped *))
((* endblock input *))
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.