Skip to content

Instantly share code, notes, and snippets.

View icebreaker's full-sized avatar
👽
Code gardening!

Mihail Szabolcs icebreaker

👽
Code gardening!
View GitHub Profile
(puts "Hello World in Runy ...")
(def (say (x)
(puts "Hello World in #{x} once again ...")
))
(class (Runy
(def (say (x)
(puts "Hello World in #{x} for the last time ...")
))
@icebreaker
icebreaker / notris.c
Last active December 20, 2015 10:26
(Open)GL Sans Triangles
/*
(Open)GL Sans Triangles.
Mihail Szabolcs, Public Domain.
Make:
gcc notris.c -lglut -lGL -lGLU -funroll-loops -O3 -o notris
Run:
./notris
@icebreaker
icebreaker / scrsat.sh
Created December 31, 2014 12:29
Screenshot Saturday 'Scrapper'
#!/bin/bash
SEARCH_URL='https://twitter.com/search?q=%23screenshotsaturday&src=savs&mode=photos'
CACHE_DIR=$HOME/.scrsat
CACHE_FILE=$CACHE_DIR/cache
mkdir -p $CACHE_DIR
touch $CACHE_FILE
function get_images()
@icebreaker
icebreaker / README.md
Last active August 29, 2015 14:11 — forked from markusfisch/README.md

mkatlas

[BASH][1] script to build a [texture atlas][2] for games. Requires [ImageMagick][3].

Usage

Just run

@icebreaker
icebreaker / fibo.asm
Last active November 14, 2015 11:58
A small "experimental" VM written in Ruby.
;
; Prints first N from the Fibonacci sequence.
;
read_n:
mov dx, 78
prc dx
mov dx, 58
prc dx
@icebreaker
icebreaker / nx_create_font_atlas.py
Last active October 19, 2015 17:35
Font Atlas Creator - GIMP (Script FU) Plugin
#!/usr/bin/env python
# Mihail Szabolcs - Released under the WTFPL (http://en.wikipedia.org/wiki/WTFPL) license.
from gimpfu import *
def nx_create_font_atlas(font, font_size, font_weight, antialiasing, uppercase, image_width, image_height, image_type, offset_x, offset_y):
gimp.set_foreground(255, 255, 255)
gimp.set_background(0, 0, 0)
if image_type == GRAY_IMAGE:
@icebreaker
icebreaker / alsa-pulse-skype.md
Last active August 29, 2015 14:03
ALSA > Pulse Audio - Skype

Why does Skype (c) have to make our lives hard by dropping support for the lovely ALSA?

In theory we could write a small shared library (object) that wraps all these and performs the equivalents with ALSA, which then could be 'injected' via LD_PRELOAD and voila, suck that Pulse Audio.

> strings skype | grep pa_

:/images/flags/16x11/pa_16x11.png
pa_stream_new
pa_stream_set_state_callback
@icebreaker
icebreaker / iterate.coffee
Created May 20, 2014 15:16
Waste or Not?
class Iterate
constructor: () ->
@items = [11, 13, 15, 3]
iterate1: () ->
for item in @items
console.log(item)
iterate2: () ->
for item in @items
@icebreaker
icebreaker / cpp.cpp
Created April 18, 2014 20:30
C++turbation
template<typename... Arguments> auto make_window(Arguments&&... args)
{
return detail::make_resource(SDL_CreateWindow, SDL_DestroyWindow, std::forward<Arguments>(args)...);
}