Skip to content

Instantly share code, notes, and snippets.

@Michcioperz
Michcioperz / list.md
Created June 11, 2015 22:23
Steam Summer '15 targets

Total resources: 19€

  • Ori and the Blind Forest
  • longterm -20% (16€)
  • mostly interested as a fan of Dust: AET
  • high priority
  • Half-Life Complete Pack
  • longterm -75% (7€)
  • at some point I'll have to anyway
  • medium priority
@Michcioperz
Michcioperz / espaniol.py
Created May 20, 2015 19:12
Random flashcard app for SL4A Python
# encoding: utf-8
import android, random, time
q = [
["el quiosco","duży kiosk"],
["el hotel","hotel"],
["la plaza","plac"],
["el banco","bank"],
["la biblioteca","biblioteka"],
["la piscina","basen"],
["el ayuntamiento","ratusz"],
@Michcioperz
Michcioperz / file.rb
Created January 31, 2015 17:58
Very important cryptographic announcement
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
I was terribly bored so I decided to publicly announce it with a proper PGP signature
-----BEGIN PGP SIGNATURE-----
Version: Keybase OpenPGP v2.0.1
Comment: https://keybase.io/crypto
wsBcBAABCgAGBQJUzRaeAAoJEP8aK/wj/PCTDL0IAOS/p6d388nf3XDIGT77bDRg
xz5noIUpHqpAzCoVR1wVXc3Yypjh8J09sCEixu68ALLAHXdp2snMsn0VvLOAtaMB
@Michcioperz
Michcioperz / keybase.md
Created November 29, 2014 12:43
keybase.md

Keybase proof

I hereby claim:

  • I am michcioperz on github.
  • I am michcioperz (https://keybase.io/michcioperz) on keybase.
  • I have a public key whose fingerprint is 9A80 15F0 FD88 5D8E 134C 0E1A A975 A555 9FDE 5409

To claim this, I am signing this object:

@Michcioperz
Michcioperz / gist:852315027d5de16f18ec
Created November 5, 2014 23:21
bookmarklet do e-dziennika UONET+ liczący średnią ze wszystkich przedmiotów (trzeba wkleić jako URL zakładki)
javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="https://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.11.1",function($,L){var%20s=0,l=0;$('.x-tmpl-cell[style="width:13%"]').each(function(){var%20t=parseFloat($(this).text());t>0&&(s+=t,l++)}),alert(s/l);});
@Michcioperz
Michcioperz / gist:a514531d6f897e19ba94
Created October 29, 2014 14:26
1D pong on atmega8 (WIP)
#include <avr/io.h>
#include <avr/interrupt.h>
int dir = 0;
int main() {
TIMSK |= (1<<TOIE0);
DDRD = (1<<PD3);
PORTD |= (1<<PD3) | (1<<PD2);
MCUCR |= (1<<ISC11);
#!/usr/bin/env python3
import subprocess, shlex
try:
while True:
subprocess.call(shlex.split('mpc %s'%input('$ ')))
except EOFError:
pass
@Michcioperz
Michcioperz / keytroll.py
Last active August 29, 2015 14:04
Flask webapp that presses media keys when asked through webserver on port 7777
#!/usr/bin/env python3
import win32api
from flask import Flask, redirect, url_for
app = Flask(__name__)
def PressKey(hexKeyCode):
win32api.keybd_event(hexKeyCode, 0x48, 0)
def ReleaseKey(hexKeyCode):
@Michcioperz
Michcioperz / story.md
Last active August 29, 2015 14:04
story based on life

Once upon a time, in a small village of Niedrzwica Duża, lived a boy named Michał. To make this story easier to read for English-speaking people, we'll call him Michi. Michi looooved everything computers. Michi loved programming, video games, website design (though he was crap at making websites look good). In 2010, Michi found an offer of an international hosting provider 1&1 that was just joining the Polish market. They were giving away a domain, 1000 subdomains, 10 GB of disk space, 10x1GB MySQL databases, 10x1GB e-mail accounts. All that for free! (Back then Michi wanted to launch a super-awesome social network based on WordPress and BuddyPress. Don't blame him, he was 12.) So Michi, after discussing it with parents, got himself such package for stunning 0 dollars, with domain name ijestfajnie.pl. ("i jest fajnie" meant "and it's cool") But that's not much important, y'know. The hosting thing is here for comparison.

A year later Michi went to middle school. How surprised he was when he saw his school's

@Michcioperz
Michcioperz / MichiTube.pyw
Created June 3, 2014 12:28
MichiTube - simple Tk wrapper over youtube-dl made for my noob schoolmates
from tkinter import *
from tkinter.ttk import *
import subprocess, os
class MichiDLFrame(Frame):
def __init__(self, code, master=None):
Frame.__init__(self, master)
self.pack()
self.excode = code
self.createWidgets()