Skip to content

Instantly share code, notes, and snippets.

View ciembor's full-sized avatar

Maciej Ciemborowicz ciembor

View GitHub Profile
@ciembor
ciembor / temperature.sh
Created July 14, 2012 14:19
This script protects the computer from being turned off after the temperature is too high. It sends warnings to the user and kills the most CPU intensive process.
#!/bin/bash
# This script protects the computer from being turned off
# after the temperature is too high. It sends warnings to
# the user and kills the most CPU intensive process.
#
# dependencies: awk, espeak, sensors
# author: Maciej Ciemborowicz
PERIOD=10
@ciembor
ciembor / gist:2759648
Created May 20, 2012 21:41
JS - Przestrzenie nazw
var namespaces = [
"jQuery",
"_",
"Backbone",
"Raphael",
"requirejs",
"ace",
"angular",
"Benchmark",
@ciembor
ciembor / tmks.py
Created April 14, 2012 18:52
Count scopes defined in Textmate color themes, than sort them and print
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import operator
try:
from collections import defaultdict
except Exception:
print("Failed to import defaultdict")
[ciembor@peace tmKeywordStats]$ ./tmks.py
54: comment
53: keyword
51: string
46: entity.other.inherited-class
45: support.function
44: storage
42: entity.other.attribute-name
39: constant
39: entity.name.tag
@ciembor
ciembor / gist:2324421
Created April 7, 2012 01:34
Great Grooveshark support:).
Maciej,
We've heard back from a few other users in Poland having the same issue. They said today they went to the site and it worked perfectly for them. Would you mind testing it out and letting us know if you continue to have any trouble?
Best,
Jessica - Community Developer
APR 06, 2012 | 07:30PM UTC
Maciej,
Thanks for getting back to us with this information. Our systems team is currently looking into this issue. As soon as they let me know what they've found I will get back to you.
@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 ---
@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 / 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 / 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 / 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;