View ifearly.py
""" | |
sphinxcontrib.ifearly | |
~~~~~~~~~~~~~~~~~~~~~ | |
Provides the ``ifearly`` directive that allows to write documentation | |
that is included depending on configuration variables. | |
Usage:: | |
.. ifearly:: releaselevel in ('alpha', 'beta', 'rc') |
View 95-mkuki-install.hook
[Trigger] | |
Type = File | |
Operation = Install | |
Operation = Upgrade | |
Target = usr/lib/modules/*/vmlinuz | |
Target = usr/lib/initcpio/* | |
Target = boot/*.img | |
Target = boot/vmlinuz-* | |
Target = usr/lib/systemd/boot/efi/linuxx64.efi.stub | |
Target = usr/share/systemd/bootctl/splash-arch.bmp |
View jail.pl
#!/usr/bin/perl | |
# This script was hastily cobbled together for my own use. It can | |
# probably break your system. Use at your own risk. | |
$JAIL = "/srv/http"; | |
$USER = "http"; | |
$GROUP = "http"; | |
$WWW_DIR = "www"; | |
$BIN = "bin"; # "bin" or "sbin" |
View main.cpp
#include <iostream> | |
#include "plugins.h" | |
int main() | |
{ | |
auto &factory = PluginSystem::PluginFactory::Instance(); | |
auto plugin = factory.GetPlugin("Plugin1"); | |
plugin->DoSomething(); |
View PKGBUILD
# Maintainer: 3ED <krzysztof1987 /at/ gmail /dot/ com> | |
# Contributor: jtts | |
pkgname=libreoffice-extension-languagetool-nofr | |
_pkgname=languagetool | |
pkgver=3.2 | |
pkgrel=1 | |
pkgdesc="An Open Source style and grammar checker. Will not register for french and can this be installed in parallel to Grammalecte" | |
arch=('any') | |
url="http://www.languagetool.org/" |
View depgraph.py
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
class DependencyGraph(object): | |
""" | |
Handle a dependency graph. Using :py:meth:`insert`, you add objects | |
to the graph and connect them with their dependencies, and the | |
:py:meth:`resolve` function will yield them back so that any object | |
comes after all its dependencies. | |
""" |
View recursivedescent.py
# Nodes for the Abstract Syntax Tree | |
class Node(object): | |
def __init__(self): | |
self.children = [] | |
self.parent = None | |
for attr in self.__attributes__: | |
setattr(self, attr, None) | |
def __repr__(self): | |
main_attr = self.__attributes__[0] | |
return "<{class_} {attr_name}={attr_value}".format( |
View robot.c
#include <stdio.h> | |
#include <string.h> | |
/* gcc -Wall -Werror -std=c11 -pedantic -o robotc robot.c */ | |
struct Robot_st { | |
int pos_x; | |
int pos_y; | |
struct BatteryStatus_st { | |
int capacity; |
View count_words.py
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import re | |
import timeit | |
# http://www.gutenberg.org/cache/epub/1597/pg1597.txt | |
# Public Domain | |
text = """ | |
Many years ago, there was an Emperor, who was so excessively fond of |
View opti.py
import timeit | |
import itertools | |
import operator | |
import random | |
import sys | |
import functools | |
import pprint | |
DEBUG = False |
NewerOlder