Skip to content

Instantly share code, notes, and snippets.

@rubo77
rubo77 / nodes_interpreter.php
Last active August 29, 2015 14:01
This file interprets the nodes.json file from http://freifunk.in-kiel.de/ffmap/nodes.json and creates a csv from it
<?
ob_start();
echo "name;geo1;geo2;id;macs;legacy\n";
$n=json_decode(file_get_contents("nodes.json"));
foreach($n->nodes as $o) if(!$o->flags->gateway){
if(empty($o->name)) {
#var_dump($o); die;
$o->name=$o->id;
}
echo $o->name.";";
@rubo77
rubo77 / nodezero package list
Created May 20, 2014 20:37
nodezero package list
acpi-support
acpid
adduser
adium-theme-ubuntu
aircrack-ng
alacarte
alsa-base
alsa-utils
anacron
apache2
@rubo77
rubo77 / .gitignore
Last active August 29, 2015 14:01
Generate a list of all nodes in the Freifunk net by analysing alfred.json (took from http://metameute.de/~nils/alfred.html and http://freifunk.in-kiel.de/alfred.html)
alfred.json
@rubo77
rubo77 / main.js
Last active August 29, 2015 14:02
this is my main.js for the firefox addon to set `network.http.response.timeout` to 24 hours.
const {Cc,Ci,Cu} = require("chrome");
var pref = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
pref.setIntPref("network.http.response.timeout", 3600*24);
/* This contentStyle hides an element with
* id="hidden_by_addon_response_timeout_24_hours"
* on all webpages, so you can notify the User if it is not installed */
require('sdk/page-mod').PageMod({
include: '*',
contentStyle: [
@rubo77
rubo77 / download-mozilla-portable.sh
Last active February 22, 2024 06:46
a script that downloads a certain Firefox or Thunderbird version and installs it in an extra folder to create an independent and portable App for Linux. source: http://portableapps.com/node/16344
#!/bin/sh
# Configure the following default variables according to your requirements
language="en-US" # e.g. "de" or "en-US"
if [ ! "$1" ]; then
# default if no argument is set:
version="95.0" # chose from http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/
application="firefox" # "thunderbird" or "firefox" but file extension, archive extraction, and binary
fi
@rubo77
rubo77 / gist:7c71c1f44e85fe9fefc2
Created June 18, 2014 15:21
Wordlist with over 1600 easy to memorizeable words
able
about
above
abuse
accept
accident
ache
acid
across
act
@rubo77
rubo77 / gist:ad30cb1ef3b5ca830559
Created June 18, 2014 15:55
Gender-Recognition Function in PHP
<?
function unhtmlentities($text_to_convert) {
return @html_entity_decode($text_to_convert, ENT_QUOTES, 'UTF-8');
}
define("ae",unhtmlentities('&auml;'));
define("oe",unhtmlentities('&ouml;'));
define("ue",unhtmlentities('&uuml;'));
define("sz",unhtmlentities('&szlig;'));
@rubo77
rubo77 / rotate-yoga.sh
Created June 19, 2014 21:47
This script rotates the screen and touchscreen input, dis- or enbles the touchpad, and dis- or enables the virtual keyboard on a Lenovo Yoga or Yoga 2 Pro
#!/bin/bash
# This script rotates the screen and touchscreen input, dis- or enbles the touchpad, and dis- or enables the virtual keyboard
if [ "$1" = "--help" ] ; then
echo 'Usage: rotate-yoga.sh [OPTION]'
echo
echo 'This script rotates the screen and touchscreen input to "inverted" or "normal"'
echo 'and dis- or enbles the touchpad, and dis- or enables the virtual keyboard'
echo
echo Usage:
@rubo77
rubo77 / rotate-screen.sh
Last active October 9, 2023 11:30
This script rotates the screen and touchscreen input, disables or enbles the touchpad, and dis- or enables the virtual keyboard on a Lenovo Yoga 13 or Yoga 2 Pro (source: http://askubuntu.com/q/405628/34298)
#!/bin/bash
# This script rotates the screen and touchscreen input 90 degrees each time it is called,
# also disables the touchpad, and enables the virtual keyboard accordingly
# by Ruben Barkow: https://gist.github.com/rubo77/daa262e0229f6e398766
#### configuration
# find your Touchscreen and Touchpad device with `xinput`
TouchscreenDevice='ELAN Touchscreen'
TouchpadDevice='SynPS/2 Synaptics TouchPad'
@rubo77
rubo77 / lsmod.log
Last active August 29, 2015 14:02
lspci -vvv and lsmod on Lenovo Yoga 2
Module Size Used by
hid_multitouch 17191 0
hid_sensor_als 12955 0
hid_sensor_magn_3d 13033 0
uvcvideo 71309 0
hid_sensor_accel_3d 13045 0
hid_sensor_gyro_3d 13033 0
videobuf2_vmalloc 13048 1 uvcvideo
hid_sensor_trigger 12820 4 hid_sensor_gyro_3d,hid_sensor_accel_3d,hid_sensor_als,hid_sensor_magn_3d
industrialio_triggered_buffer 12794 4 hid_sensor_gyro_3d,hid_sensor_accel_3d,hid_sensor_als,hid_sensor_magn_3d