Skip to content

Instantly share code, notes, and snippets.

@rubo77
rubo77 / html-example.html
Created June 28, 2014 05:50
This page doesn't contain any style elements and usually the text in form elements has about the same size like normal ktext, but uf you zoom system-wide in Ubuntu Unity, all form elements get doubled twice (see http://stackoverflow.com/questions/23783899/why-are-all-html-form-elements-huge-with-a-system-wide-font-scale-factor-2-0 )
<html>
<body>
<h1>header</h1>
<p>normal text</p>
<form>
<input value="input field">
<select><option>select option</select>
<input type=button value="button">
<input type=submit value="submit">
@rubo77
rubo77 / gist:7be7b92c6800e6a069a0
Created July 29, 2014 18:43
Primordial Soup Manual
Feeding and Excretion
Whether you have 5 or 6 players, an unmutated amoeba always eats 4
foodstuff cubes in 4 different colors, not its own, per round. Thus, with 6
players, an amoeba can ignore one color. Excretion is still two cubes of
the amoeba’s own color.
Designed by Doris Matthäus and Frank Nestel
A game expansion for 5 to 6 players of 12 years or older.
Duration: 2 hours.
@rubo77
rubo77 / alfred-log.sh
Last active August 29, 2015 14:04
alfred-log.sh
nodes='cat alfred.json';
files=logs/nodes;
mkdir -p $files;
$nodes|jq '.[].network.mac'|while read i; do
$nodes |jq '.['$i']' > $files/$($nodes |jq '.['$i'].hostname');
done
@rubo77
rubo77 / config
Created August 14, 2014 05:49
~/.ssh/config example with selected identity file for a certain server
Host example.org
IdentityFile ~/.ssh/id_rsa
Host *
ForwardAgent no
IdentitiesOnly yes
@rubo77
rubo77 / mount-root
Last active May 25, 2023 08:22
Mounts all needed mount points to change into another system from within a live-CD
#!/bin/bash
# mounts all needed mount points to change into another system from within a live-CD
#-------------- Author: -------------#
# by Ruben Barkow (Rubo77)
if [ "$(whoami &2>/dev/null)" != "root" ] && [ "$(id -un &2>/dev/null)" != "root" ] ; then
echo "You must be root to run this script!"; echo "use 'sudo !!'"; exit 1
fi
@rubo77
rubo77 / select_device
Last active August 29, 2015 14:06
Selects the device in a dialog screen and prints it out
#!/usr/bin/env bash
result=$(mktemp)
IFS=
eval dialog --menu \"Please choose a filesystem:\" 50 50 10 $(lsblk -f | sed -r 's/^/"/;s/$/" " "/' | tr $'\n' ' ') 2>$result
D="$(cat $result|sed 's/\s.*//g'|sed 's/\W//g')"
echo $D
@rubo77
rubo77 / upgrade-only-bash-and-gcc
Created September 26, 2014 19:55
apt-get install --only-upgrade bash gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libgcj-bc libbcmail-java libbcprov-java-gcj libbcmail-java-gcj libgcj13 libbcprov-java libitext-java libgnumail-java libgnuinet-java libitext-java-gcj gcj-4.7-base
libgnujaf-java
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
binutils cpp cpp-4.4 cpp-4.7 g++-4.4 gcc-4.4 gcc-4.4-base gcc-4.7 gcc-4.7-base gcj-4.6-base gcj-4.7-base libc-bin libc-dev-bin libc6 libc6-dev libc6-i686 libdb5.1 libgcc1
@rubo77
rubo77 / ignorelist
Last active September 20, 2024 17:28
This ignorelist can be used to backup your home folder without useless folders and files, see http://askubuntu.com/a/545676/34298
# rsync-homedir-excludes
#
# A list of files to exclude when backing up *nix home directories using rsync.
#
# Author: Ruben Barkow <https://gist.github.com/rubo77> (original)
# Version: 2015-08-30
# Website: https://gist.github.com/rubo77/8ffaadbc58ab099d2bc3
# the repository has moved to github
@rubo77
rubo77 / gist:bd9183fe2794467f482c
Last active August 29, 2015 14:09
packages in NodeZero but not in Ubuntu 10.04 (generated by http://askubuntu.com/a/466008/34298)
aircrack-ng
apache2
apache2-mpm-worker
apache2-utils
apache2.2-bin
apache2.2-common
arpalert
arptables
autoconf
automake
@rubo77
rubo77 / phpBB3.0.7-PL1-PHP5.4.35-0+deb7u2.diff
Created December 3, 2014 11:01
Differences to get phpBB3.0.7-PL1 running on PHP5.4.35-0+deb7u2
diff --git a/includes/auth/auth_db.php b/includes/auth/auth_db.php
index 73c4f92..e50bdab 100755
--- a/includes/auth/auth_db.php
+++ b/includes/auth/auth_db.php
@@ -75,7 +75,7 @@ function login_db(&$username, &$password)
include ($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
}
- $captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $captcha = @phpbb_captcha_factory::get_instance($config['captcha_plugin']);