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
@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)...);
}
@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 / 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 / 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 / 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()
some test
@icebreaker
icebreaker / think.markdown
Created March 12, 2009 12:24 — forked from csexton/think.markdown
Note to self.

Note to Self

Be Confident

Tests build confidence. Write 'em. They'll save your ass, and they'll let you take a chainsaw to your code without being afraid of unintended consequences.

Be Lazy

//Tower of Hanoi
//No of calls made for n disks is equal to pow(2,n) -1.
void hanoi(int n, char a, char c, char b)
{
if(n==1)
{
printf("\nShift disk 1 from %c to %c",a,c);
return ;
}
hello world from python!
@icebreaker
icebreaker / test.cpp
Created March 14, 2009 04:16
this is an edit test
this is an edit test