Skip to content

Instantly share code, notes, and snippets.

Ruben Barkow rubo77

Block or report user

Report or block rubo77

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rubo77
rubo77 / MainActivity.java
Last active May 7, 2019 — forked from sandeepyohans/MainActivity.java
Adding alert() support to a WebView - Android
View MainActivity.java
/*
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 {
View freifunk_gateway_connection_check.sh
#!/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 Apr 1, 2019
Downloads 90 random generated midi files from each section in http://anticulture.net
View random-music-downloader.sh
#!/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
View synapse.html
<!-- $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 Nov 14, 2018
Freifunk Halle Bietet an, root ssh keys auf den Knoten zu installieren
View gist:041aa680a95bdfd4df06923df341509f
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 Nov 2, 2018 — forked from binarytemple/sourceforge.to.github.impor.markdown
import a sourceforge project (with full history) to github
View sourceforge.to.github.impor.markdown

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 Aug 11, 2018 — forked from leolin310148/solve.md
solve "error initializing graphdriver: loopback attach failed" for docker-in-docker
View solve.md

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
View All_Packages.md

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 Nov 13, 2018 — forked from Avyd/Compile to .deb
Compile kernel to installable .deb package
View Compile to .deb
# 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
View matrix_synapse_purge_history_multi_room.sh
#!/bin/bash
# This script purges the local history older than 90 days in some rooms, that you can define in an array
#
# crontab -e
# 23 4 * * * bash /home/irc-bridge/.synapse/EIGENE_purge_history_daily > /dev/null 2>&1
cd /home/irc-bridge/.synapse/
DOMAIN="matrix.yourserver.org"
ADMIN="@some_adminuser:matrix.yourserver.org"
You can’t perform that action at this time.