Skip to content

Instantly share code, notes, and snippets.

View hjanuschka's full-sized avatar
🤖
-.-

Helmut Januschka hjanuschka

🤖
-.-
  • Vienna/Austria
View GitHub Profile
@evocateur
evocateur / fixconsolas
Created March 15, 2009 00:15
Fix Consolas's line-height on OS X
#!/bin/bash
#
# Requires ftxdumperfuser from http://developer.apple.com/textfonts/download/
#
# Usage: fixconsolas [files ...]
# When called with no arguments, it attempts to operate on every TrueType
# file in the current directory.
#
# References:
# http://bandes-storch.net/blog/2008/12/21/consolas-controlled/#comment-2042
@randrews
randrews / lua_map.c
Created April 23, 2011 22:16
Example of embedding Lua in C
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
#include <stdlib.h>
int map_create(lua_State *lua);
int map_slice(lua_State *lua);
int main(int argc, char **argv){
lua_State *lua = lua_open();
@dnishimura
dnishimura / Makefile.golang
Created June 20, 2012 17:51 — forked from yanatan16/Makefile.golang
Makefile for Golang projects
# Makefile for a go project
#
# Author: Jon Eisen
# site: joneisen.me
#
# Targets:
# all: Builds the code
# build: Builds the code
# fmt: Formats the source files
# clean: cleans the code
@advantis
advantis / ADVArrayDataSource.h
Last active December 20, 2015 10:59
Generic UITableView/UICollectionView data source for objects in NSArray
//
// Copyright © 2013 Yuri Kotov
//
#import <Foundation/Foundation.h>
#import "ADVIndexedSubscripting.h"
typedef void(^ADVCellConfigurationBlock)(id cell, id object);
@interface ADVArrayDataSource : NSObject <ADVIndexedSubscripting, UITableViewDataSource, UICollectionViewDataSource>
@bithive
bithive / coin_acceptor.rb
Created December 20, 2013 23:08
A simple class for reading values from the DG600F coin acceptor sold by SparkFun (https://www.sparkfun.com/products/11636)
#!/usr/bin/env ruby
# A simple class for reading values from the DG600F coin acceptor sold by
# SparkFun (https://www.sparkfun.com/products/11636)
#
# The coin acceptor must be configured to send three bytes per coin; see section
# 8.6 of the manual.
#
# You can configure the serial device and baud rate, e.g.:
#
@frdmn
frdmn / osx-10-10-virtualbox.md
Last active February 22, 2022 08:39
Install OS X 10.10 Yosemite in VirtualBox
@Antarix
Antarix / CardView.h
Last active January 7, 2020 12:11
Simple CardView for iOS Objective-C
#import <UIKit/UIKit.h>
@interface CardView : UIView
@end