Skip to content

Instantly share code, notes, and snippets.

View eni23's full-sized avatar
👾
"working"

Cyrill v.W. eni23

👾
"working"
View GitHub Profile

Bluetooth Button Remap

Setup udev

/etc/udev/hwdb.d/90-sbutton.hwdb

evdev:input:b0005v099Ap0500*
 KEYBOARD_KEY_c00e9=s
 KEYBOARD_KEY_70028=r
#include <stdio.h>
float buffer[16] = {
22.66,
22.67,
22.15,
22.85,
21.90,
21.90,
24.01,
'AdSy.website2:TeamMember':
superTypes:
- 'TYPO3.Neos:Content'
ui:
group: 'general'
icon: 'icon-map-marker'
label: 'Team Member'
inlineEditable: TRUE
inspector:
groups:
var cdc_device = function(){
this.ready = false;
this.error = false;
// init device
this.init = function( callback ){
digicdc.register(
(function success(){
/*******************************************************************************
*
* flower-power device abstraction
*
* deps:
* npm install flower-power
*
* author: cyrillvw
*
* usage example:
#!/bin/bash
IFACE=org.freedesktop.Notifications
MEMBER=Notify
dbus-monitor --monitor "interface='$IFACE',member='$MEMBER'" |
while read -r line; do
if [ "$(echo $line | grep 'mail-notification')" ]; then
blinkstick --pulse --set-color='#00ff00' --duration=1000
<?php
define('DB_USER', 'dbuser');
define('DB_PASSWORD', 'dbpass');
$db = mysql_connect('localhost', DB_USER, DB_PASSWORD);
mysql_select_db("dbname",$db);
$result = mysql_query("SELECT ID, post_content FROM wp_posts");
while ($row = mysql_fetch_array($result)) {
$match=strpos($row[1],"<script");
if ($match){
#!/bin/bash
# genstatic.sh-0.1.3
# by eni@e23.ch
usage(){
cat << 'EOF'
genstatic.sh
Generate xxd-include & header from a directory
Usage:
SetEnvIfNoCase User-Agent ^$ bad_bot
SetEnvIfNoCase User-Agent "^Java.*" bad_bot
SetEnvIfNoCase User-Agent "-" bad_bot
SetEnvIfNoCase User-Agent "^BacklinkCrawler" bad_bot
SetEnvIfNoCase User-Agent "PHP/*" bad_bot
SetEnvIfNoCase User-Agent "PhantomJS*" bad_bot
SetEnvIfNoCase User-Agent "Prlog/1.0" bad_bot
SetEnvIfNoCase User-Agent "^attach" bad_bot
SetEnvIfNoCase User-Agent "^Au2Email" bad_bot
SetEnvIfNoCase User-Agent "^Advanced Email Extractor" bad_bot
#!/bin/bash
RESOURCE_PREFIX="staticfile_"
LOOKUP_FUNCTION_NAME="lookup_file"
DATATABLENAME="datatable"
XXD="/usr/bin/xxd"
INPUT_DIR=$1
OUTPUT_FILE=$2