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 / threads.h
Created May 19, 2019 14:08 — forked from yohhoy/threads.h
C11 <threads.h> emulation library
/*
* C11 <threads.h> emulation library
*
* (C) Copyright yohhoy 2012.
* Distributed under the Boost Software License, Version 1.0.
* (See copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef EMULATED_THREADS_H_INCLUDED_
#define EMULATED_THREADS_H_INCLUDED_
@icebreaker
icebreaker / extract_JavaForMacOSX10_5Update10.sh
Created October 30, 2017 10:57 — forked from marcoshack/extract_JavaForMacOSX10_5Update10.sh
Extract Java JDK 1.5 from JavaForMacOSX10.5Update10.dmg (original Apple distribution)
cd ~/Downloads
wget http://support.apple.com/downloads/DL1359/en_US/JavaForMacOSX10.5Update10.dmg \
-O ~/Downloads/JavaForMacOSX10.5Update10.dmg
hdiutil attach ~/Downloads/JavaForMacOSX10.5Update10.dmg
pkgutil --expand /Volumes/Java\ For\ Mac\ OS\ X\ 10.5\ Update\ 10/JavaForMacOSX10.5Update10.pkg \
~/Downloads/JavaForMacOSX10.5Update10
cd ~/Downloads/JavaForMacOSX10.5Update10/JavaForMacOSX10.5Update10.pkg/
@icebreaker
icebreaker / gist:3d11d13249c0f00de2b6ef522091e462
Created September 21, 2017 11:51 — forked from PVince81/gist:63800bffd437f2175da9
build-sdl2-for-torchlight.sh
# set this to your Torchlight directory
TORCHLIGHTDIR=$HOME/games/Torchlight
hg clone http://hg.libsdl.org/SDL
# check out the revision before the one that introduces the bug as advised here: http://forums.runicgames.com/viewtopic.php?f=24&t=33360&start=60#p474739
hg up 4de584a3a027 --clean
# Fix X11 compilation issues with another changeset
hg export 6caad66a4966 > patch
hg import patch
@icebreaker
icebreaker / output.txt
Created November 15, 2016 16:20
weird clang++ / g++ behavior
$ clang++ -O0 test1.cpp test2.cpp -o simple; ./simple
destructor 1
destructor 1
$ clang++ -O1 test1.cpp test2.cpp -o simple; ./simple
destructor 1
destructor 1
$ clang++ -O2 test1.cpp test2.cpp -o simple; ./simple
destructor 1
destructor 2
$ clang++ -O3 test1.cpp test2.cpp -o simple; ./simple
@icebreaker
icebreaker / ruby_emoji.rb
Created October 25, 2016 11:47
Ruby Emoji
#!/usr/bin/env ruby
def ⌨ ✉️
puts ✉️
end
def ☠ ⚒
⌨ ⚒
end
@icebreaker
icebreaker / uri_extract.rb
Created August 9, 2016 11:40
Unexpected URI.extract()
>> require 'uri'
>> URI.extract('hello world test: https://helloworld.com test')
=> ["test:", "https://helloworld.com"]
@icebreaker
icebreaker / nyan.c
Last active April 13, 2016 20:08
nyan.c - IOCCC warm-up
#include <stdio.h>
#include <unistd.h>
int main(){const char *O_o[]=/*msz*/{
" ,------,\n" "v| /\\__/\\ \n"
" |__( ^ w ^) \n" " \" \"\n",
" ,------,\n"
"~| /\\__/\\\n"
" |___( ^ w ^) \n"
" \" \"\n",
@icebreaker
icebreaker / chasm.txt
Created November 2, 2015 12:56
Chasm: The Rift
L#k>L#0
WjZj
Wi>L#
L#i>L#
F#i>L#
L#u
k>L#0
Wk>L#
Wi>L#
6.#h
(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