Skip to content

Instantly share code, notes, and snippets.

@rubo77
rubo77 / 00_local_excludes
Last active July 7, 2022 16:47
/etc/aide/aide.conf.d/00_local_excludes exclude file with all folders, that frequently change
!/backup*
!/dev/disk/
!/etc/.etckeeper
!/etc/.git/
!/etc/aide/.aide.conf.swp
!/etc/aide/.aide.conf.swp
!/etc/aide/aide.conf.d/00_local_excludes
!/etc/ld.so.cache
!/etc/lvm/archive
!/etc/lvm/backup
@rubo77
rubo77 / MainActivity.java
Last active May 7, 2019 13:16 — forked from sandeepyohans/MainActivity.java
Adding alert() support to a WebView - Android
/*
Retrieved from https://web.archive.org/web/20160516165158/http://lexandera.com/2009/01/adding-alert-support-to-a-webview/
*/
// ...
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
public class MainActivity extends AppCompatActivity {
#!/bin/sh
# this script can log the quality of fastd-connections to all gateways
# it sets only one gateway active at a time and checks the connection.
# add this script as cron script to get a statistic over time
COMMUNITY_NAME=ffki;
GW_PREFIX=vpn
GATEWAYLIST="0 1 2 4 6"
PING_IP6=2a01:4f8:171:27a2:0:77:77:254
STATISTIC_LOG_FILE=/tmp/gw_connection_statistic.log
for ENABLED in $GATEWAYLIST; do
@rubo77
rubo77 / random-music-downloader.sh
Created April 1, 2019 22:27
Downloads 90 random generated midi files from each section in http://anticulture.net
#!/bin/bash
# enable all soundfonts in timidity https://unix.stackexchange.com/questions/97883/timidity-no-instrument-mapped-to-tone-bank-0-no-idea-which-one-is-missing
base="/home/ruben/midi-generated/AntiCulture.Net"
for i in $(seq 10 99); do
file="$base - Jazz (Randomly Generated) - $i.mid"
echo $file
curl -K -vs http://anticulture.net/JazzGenerator.php -o "$file"
file="$base - Jazz Fusion (Randomly Generated) - $i.mid"
echo $file
<!-- $Header: /cvsroot/autodoc/autodoc/html.tmpl,v 1.4 2006/05/16 19:01:27 rbt Exp $ -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Index for synapse</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
BODY {
@rubo77
rubo77 / gist:041aa680a95bdfd4df06923df341509f
Last active November 14, 2018 19:24
Freifunk Halle Bietet an, root ssh keys auf den Knoten zu installieren
mit OPT-IN, also OK:
Dies ist der code:
$ gluon-ffhal-0.9.1~20180619-tp-link-tl-wr842n-nd-v3-sysupgrade.bin.extracted$ cat ./ffhal-ssh-keys.*
Package: ffhal-ssh-keys
Version: 1
Depends: libc
Source: /home/mfuhrmeister/freifunk/gluon-package/ffhal-ssh-keys
@rubo77
rubo77 / sourceforge.to.github.impor.markdown
Last active December 27, 2022 11:29 — forked from binarytemple/sourceforge.to.github.impor.markdown
import a sourceforge project (with full history) to github

In order to clone the timeeffect application from sourceforge to github I performed the following steps.

rsync -av rsync://a.cvs.sourceforge.net/cvsroot/timeeffect/\* cvs
svn export --username=guest http://cvs2svn.tigris.org/svn/cvs2svn/trunk cvs2svn-trunk
cp ./cvs2svn-trunk/cvs2git-example.options ./cvs2git.options
vim cvs2git.options # edit run_options.set_project
cvs2svn-trunk/cvs2git --options=cvs2git.options --fallback-encoding utf-8
#create at https://github.com/rubo77/timeeffect.git
git clone git@github.com:rubo77/timeeffect.git timeeffect-github
@rubo77
rubo77 / solve.md
Created August 11, 2018 16:39 — forked from leolin310148/solve.md
solve "error initializing graphdriver: loopback attach failed" for docker-in-docker

Create loopback.sh in tmp

#!/bin/bash
ensure_loop(){
  num="$1"
  dev="/dev/loop$num"
  if test -b "$dev"; then
    echo "$dev is a usable loop device."
 return 0

this is the output of the script generate_markdown_of_packages.sh below:

Main Gluon Packages

gluon/package/gluon-alfred

Configure alfred

depends on +gluon-core +gluon-respondd +gluon-neighbour-info gluon-mesh-batman-adv +micrond +alfred
@rubo77
rubo77 / Compile to .deb
Last active November 13, 2018 16:34 — forked from Avyd/Compile to .deb
Compile kernel to installable .deb package
# Install necessary things
apt-get update
apt-get install --no-install-recommends kernel-package libncurses5-dev fakeroot wget bzip2 build-essential bison
# Get the kernel
cd /usr/src
# search latest kernel on https://mirrors.edge.kernel.org/pub/linux/kernel/v4.x/
VERSION=4.18.6
wget https://mirrors.edge.kernel.org/pub/linux/kernel/v4.x/linux-$VERSION.tar.xz
wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-$VERSION.tar.sign