Skip to content

Instantly share code, notes, and snippets.

@pointhi
pointhi / find_images.sh
Created December 1, 2018 19:45
find image files on a busybox machine (without using tools like file, ...)
#!/bin/sh
if [ $# -eq 0 ]
then
echo "Usage: $0 <search_root_dir>"
exit
fi
echo "------ start in directory: \"`pwd`/$1\""
find $1 -type f | while read fname; do
@pointhi
pointhi / extend.sh
Last active November 7, 2017 14:36 — forked from wvengen/extend.sh
Extend non-HiDPI external display left to HiDPI internal display
#!/bin/sh
# extend non-HiDPI external display on DP* on the left side of the HiDPI internal display eDP*
#
# run the script a second time if you get an error like:
# xrandr: specified screen 6400x2160 not large enough for output HDMI1 (5120x2880+0+0)
#
# see also https://wiki.archlinux.org/index.php/HiDPI
# you may run into https://bugs.freedesktop.org/show_bug.cgi?id=39949
# https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/883319
@pointhi
pointhi / kicad_logo_cleanup.sh
Created August 15, 2016 15:42
cleanup footprints after runing the "Bitmap to Component Converter" of KiCad
#!/bin/bash
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors
@pointhi
pointhi / pil_with_pyopencl.py
Created July 16, 2016 15:22
A minimal example to show how PIL.Image can be used in combination with pyopencl to do hardware accelerated image modification
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This script is a simple test to do image operations on pyopencl in combination with PIL
#
# based on the code of: https://gist.github.com/likr/3735779
import pyopencl as cl
import numpy
# Fail2Ban configuration file
#
# Check fail2ban actions onto searx filters
#
# Author: Thomas Pointhuber
#
# revision: 1.0
#
[Definition]
# Fail2Ban configuration file
#
# List of json requests using searx
#
# Author: Thomas Pointhuber
#
# revision: 1.0
#
[Definition]
# Fail2Ban configuration file
#
# List of rss requests using searx
#
# Author: Thomas Pointhuber
#
# revision: 1.0
#
[Definition]
@pointhi
pointhi / apache-searx-proxy.conf
Created March 3, 2016 11:59
fail2ban rule to block bots which are abusing the searx proxy
# Fail2Ban configuration file
#
# List of proxy requests over searx
#
# Author: Thomas Pointhuber
#
# revision: 1.0
#
[Definition]
@pointhi
pointhi / apache-searx-search.conf
Last active March 3, 2016 12:00
fail2ban rule to block bots which are abusing the searx search
# Fail2Ban configuration file
#
# List of search requests using searx
#
# Author: Thomas Pointhuber
#
# revision: 1.0
#
[Definition]