Skip to content

Instantly share code, notes, and snippets.

View pschichtel's full-sized avatar

Phillip Schichtel pschichtel

View GitHub Profile
#include<stdlib.h>
#include<stdio.h>
#include<math.h>
#define MIN_STEM_HEIGHT 1
#define MIN_STEM_WIDTH 1
int main(int argc, char** argv) {
From 2bc3ec968a2c5d287a23b331efa710a72a31f0e2 Mon Sep 17 00:00:00 2001
From: Phillip Schichtel <[email protected]>
Date: Tue, 19 Sep 2017 22:51:53 +0200
Subject: [PATCH] remove multilib dependencies
---
PKGBUILD | 28 ++++++++++------------------
1 file changed, 10 insertions(+), 18 deletions(-)
diff --git a/PKGBUILD b/PKGBUILD
@pschichtel
pschichtel / ps1.sh
Last active July 1, 2017 16:04
ps1.sh
build_ps1() {
local black='\[\033[00;30m\]'
local blue='\[\033[00;34m\]'
local green='\[\033[00;32m\]'
local cyan='\[\033[00;36m\]'
local red='\[\033[00;31m\]'
local purple='\[\033[00;35m\]'
local brown='\[\033[00;33m\]'
local lgray='\[\033[00;37m\]'
#!/usr/bin/python
from __future__ import print_function
import sys, re, math
from requests import Session
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:48.0) Gecko/20100101 Firefox/48.0'
}
<!DOCTYPE html>
<html>
<head>
<title>Commute Cost Calculator</title>
<meta charset="UTF-8">
<style>
html, body {
padding: 0;
margin: 0;
font-family: Verdana, Arial, sans-serif;
@pschichtel
pschichtel / block_ip.py
Last active January 19, 2025 13:38
A script to add an address to an alias in a pfSense firewall. The intended use is for fail2ban like tools.
#!/usr/bin/env python
from requests import Session
from re import findall
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument('--pfsense', type=str, metavar='address', required=True, help="Firewall base url")
parser.add_argument('--username', type=str, metavar='username', required=True, help="Firewall login username")
parser.add_argument('--password', type=str, metavar='password', required=True, help="Firewall login password")
@pschichtel
pschichtel / hook.sh
Last active March 21, 2016 00:04
A simple hook execution script
#!/bin/sh
self="$(readlink -f "$0")"
scriptdir="${self}.d"
if ! test -d "$scriptdir"
then
echo "Hook directory ${scriptdir} not found!"
exit 1
fi
function compile(selector) {
function identity(x) {
return x
}
function compose(f, access) {
return function(x) {
let r = f(x)
if (r && access in r) return r[access]
@pschichtel
pschichtel / daemon.conf
Last active December 29, 2015 12:12
My PulseAudio Daemon Configuration configured for high quality upsampling. alsa-plugins, libsamplerate and pulseaudio >= 2.0 are required for this
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[Unit]
Description=Loads the VirtualBox kernel modules
[Service]
Type=oneshot
ExecStart=/sbin/rcvboxdrv setup
[Install]
RequiredBy=multi-user.target