Skip to content

Instantly share code, notes, and snippets.

@okthatsneat
okthatsneat / commits-report.rb
Created April 2, 2014 09:49
Aggregate all commits of repos under top level dir
#!/usr/bin/env ruby
# use https://github.com/libgit2/rugged
require 'rugged'
# all dirs under the current path with git repos
repo_dirs = Dir.glob("**/.git", File::FNM_DOTMATCH)
# init rugged objects
repos = repo_dirs.map do |repo_path|
class PostParser
include HTTParty
format :json
def initialize(post_id)
@post = Post.find(post_id)
end
def extract_tracks_from_embeds
#strategy: first extract from body and summary feed fields. if none present
@okthatsneat
okthatsneat / gist:5203291
Last active December 15, 2015 04:39
2nd Day Intercultural Communication WiSe2012/2013 HTW Berlin
what's new in intercultural communication
intersecting categories
culture
gender
religion
class
national belonging
those are only performed, but not naturally given
what is deconstruction
@okthatsneat
okthatsneat / stupidQuestion.c
Created July 13, 2012 08:26
stupid question
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
/*
Definieren Sie eine Strukturvariable für Personendaten namens "person" mit den 20 Zeichen
breiten Elementen name, vorname, geburtsort und dem vorzeichenlosen langen Integer geboren.
*/
struct person {
@okthatsneat
okthatsneat / LoadPGM
Created June 25, 2012 09:23
LoadPGM
unsigned short LoadPGM(FILE * inFile, Image * inImg) {
/********************************************************************************************/
// parse binary pgn file to validate format, extract width, height, and greyvalue data array.
// read file bytewise
int position = 1;
int c;
// parse first line. Expecting P5, abort if not. P is 80, 5 is 53, linebreak is 10
@okthatsneat
okthatsneat / pgmnorm.c
Created June 18, 2012 17:09
pgmnorm.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <errno.h>
#define STRINGBUF 1024
#define SPACE 32
#define LINEBREAK 10
#define CHAR_P 80