Skip to content

Instantly share code, notes, and snippets.

View icebreaker's full-sized avatar
:octocat:
Code Gardening

Mihail Szabolcs icebreaker

:octocat:
Code Gardening
View GitHub Profile
@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
@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: