Skip to content

Instantly share code, notes, and snippets.

View ciembor's full-sized avatar

Maciej Ciemborowicz ciembor

View GitHub Profile
@ciembor
ciembor / bar_chart.c
Created October 23, 2011 00:50
Draw bar chart (university homework - libgd)
// author: Maciej Ciemborowicz
// Jagiellonian University
// ZGK 2011/2012
#include <gd.h>
#include <gdfontg.h>
#include <string.h>
#include "gd_wewy.h"
int main(int argc, char * argv[])
@ciembor
ciembor / saturation.c
Created October 23, 2011 13:54
Change saturation (university homework - libgd)
// author: Maciej Ciemborowicz
// Jagiellonian University
// ZGK 2011/2012
#include <stdio.h>
#include <math.h>
#include <gd.h>
#include "gd_wewy.h"
#define MIN(a,b) ((a)<(b)?(a):(b))
@ciembor
ciembor / prir01.c
Created November 6, 2011 20:07
Perkolacja
/*
*
* autor: Maciej Ciemborowicz
* Uniwersytet Jagielloński
* PRIR 2011/2012
*
* kompilacja: gcc prir01.c -std=c99 -pedantic -Wall -D_XOPEN_SOURCE=600
* uruchamianie: ./a.out rozmiar_tablicy delta_Pb ilosc_eksperymentow liczba_procesow
*
* Zarys działania programu
@ciembor
ciembor / gist:1494530
Last active July 26, 2026 19:54
RGB to HSL and HSL to RGB conversion functions
/*
* Copyright 2011 Maciej Ciemborowicz
* https://maciej-ciemborowicz.eu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@ciembor
ciembor / bn.c
Created December 19, 2011 14:45
Brightness normalization
/*
* author: Maciej Ciemborowicz
* Jagiellonian University
* ZGK 2011/2012
*
* gcc gd_wewy.o bn.c -o bn -lgd -ansi -Wall -pedantic
*/
#include <stdio.h>
#include <math.h>
@ciembor
ciembor / Autobusy.java
Created January 5, 2012 01:31
PRIR 06
/*
* autor: Maciej Ciemborowicz
* PRIR 2011/2012
* Uniwersytet Jagielloński
*
*/
import java.util.Random;
import java.util.concurrent.CyclicBarrier;
@ciembor
ciembor / bitwaMorska.upc
Created January 12, 2012 19:34
PRIR 04 - UPC
/* autor: Maciej Ciemborowicz
* PRIR 2011/2012
* bitwaMorska
* testowane z GCC UPC 4.7.0
*/
#include <upc_relaxed.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
@ciembor
ciembor / ranges.upc
Created January 31, 2012 02:05
Przedziały równoliczne
/*
* autor: Maciej Ciemborowicz
* Uniwersytet Jagielloński
* PRIR 2011/2012
* kompilacja: /usr/local/berkeley_upc/bin/upcc ranges.upc -fupc-threads-N
* (gdzie N to ilość procesów)
* uruchomienie: /usr/local/berkeley_upc/bin/upcrun a.out ILOSC_PRZEDZIALOW
*/
#include <upc_relaxed.h>
@ciembor
ciembor / qunit.css
Created March 10, 2012 22:45
Customized QUnit CSS style. Dark, with Monokai colors.
/**
* QUnit v1.4.0pre - A JavaScript Unit Testing Framework
*
* http://docs.jquery.com/QUnit
*
* Copyright (c) 2012 John Resig, Jörn Zaefferer
* Dual licensed under the MIT (MIT-LICENSE.txt)
* or GPL (GPL-LICENSE.txt) licenses.
*/
@ciembor
ciembor / gist:2288538
Created April 3, 2012 01:17
Grooveshark
[ciembor@peace ~]$ ping stream57-he.grooveshark.com
PING stream57-he.grooveshark.com (8.20.213.32) 56(84) bytes of data.
^C
--- stream57-he.grooveshark.com ping statistics ---
27 packets transmitted, 0 received, 100% packet loss, time 26008ms
[ciembor@peace ~]$ ping stream67-he.grooveshark.com
PING stream67-he.grooveshark.com (8.20.213.34) 56(84) bytes of data.
^C
--- stream67-he.grooveshark.com ping statistics ---