This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @file potatopercentage.c | |
* @brief Fetch the current battery percentage from UPower and output it. | |
* | |
* Released into the public domain. | |
* http://creativecommons.org/publicdomain/zero/1.0/ | |
*/ | |
#include <math.h> | |
#include <stdarg.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Pounce-and-write. Waits until a file is accessible, then either writes a set | |
* of lines into it or executes a command. | |
* | |
* Released into the public domain. | |
* http://creativecommons.org/publicdomain/zero/1.0/ | |
*/ | |
#include <errno.h> | |
#include <stdbool.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Changes the resolution of a display on Windows. | |
* Useful for fixing the size of Wine's virtual desktop. | |
* | |
* Released into the public domain. | |
* http://creativecommons.org/publicdomain/zero/1.0/ | |
*/ | |
#include <stdio.h> | |
#include <wchar.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Creates fuel-rod diagrams. | |
import re | |
MARGIN_TOP = 4.5 | |
MARGIN_LEFT = 4.5 | |
MARGIN_RIGHT = 5.5 | |
MARGIN_BOTTOM = 5.5 | |
BOX_WIDTH = 50 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# Detects duplicate address specifications (addr:street, addr:housenumber | |
# and possibly addr:unit) in an OSM XML file. | |
# | |
# Released into the public domain. | |
from xml.dom.minidom import parseString as domParse | |
import xml.dom as dom |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Method; | |
import java.lang.reflect.Modifier; | |
/** | |
* The Invisible | |
* | |
* Checks for questionable visibility in a list of classes. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import re | |
import os, os.path | |
import tempfile | |
from subprocess import Popen, PIPE | |
""" | |
RealPopen = Popen | |
def Popen(args, *posarg, **kwarg): | |
print(args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Powers on the bluetooth adapter, connects to the headset and sets it as | |
# the default PulseAudio sink. | |
# | |
# Released into the public domain. | |
# http://creativecommons.org/publicdomain/zero/1.0/ | |
from sys import stderr | |
from gi.repository import GLib, Gio | |
from subprocess import Popen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Cycle | |
{ | |
private int elem; | |
private Cycle next; | |
public Cycle(int value, Cycle cycle) { | |
elem = value; | |
if (cycle == null) { | |
next = this; | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Released into the public domain. | |
// http://creativecommons.org/publicdomain/zero/1.0/ | |
// Tipp: | |
// Integer.TYPE: Class<?>, die den primitiven Datentyp int beschreibt | |
// Integer.class: Class<?>, die die Integer-Klasse beschreibt | |
import java.lang.reflect.Array; | |
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Field; |