Skip to content

Instantly share code, notes, and snippets.

@Strubbl
Strubbl / _show.html.haml
Created August 28, 2011 18:27
strubbl:/var/www/diaspora[master]$ cat app/views/home/_show.html.haml
#content
.center
%h2 Willkommen auf dem Sund-Xplosion e.V. Pod!
$(function){
loader = setInterval( function(){
jQuery('#bodyContent').load( window.location.href + '#bodyContent' );
/*
* use '#bodyContent>*' selector for getting just the contents of #bodyContent
* but not the #bodyContent itself
* in addition: this will strip the script element as well, since we use a selector ;-)
*/
}, 300000 );
});
@Strubbl
Strubbl / gist:5655531
Created May 27, 2013 06:48
tt-rss.init
#! /bin/sh
### BEGIN INIT INFO
# Provides: tt-rss
# Required-Start: $local_fs $remote_fs
# Should-Start: mysql postgresql
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Tiny Tiny RSS update daemon
# Description: Update the Tiny Tiny RSS subscribed syndication feeds.
@Strubbl
Strubbl / gist:6875387
Last active December 24, 2015 22:49
xrandr commands to get Dell 27" to work with Intel graphics
cvt 2560 1440
xrandr --newmode "2560x1440_60.00" 312.25 2560 2752 3024 3488 1440 1443 1448 1493 -hsync +vsync
xrandr --addmode HDMI1 "2560x1440_60.00"
xrandr --output HDMI1 --mode "2560x1440_60.00"
@Strubbl
Strubbl / gist:9791966
Created March 26, 2014 20:03
cat /var/log/Xorg.0.log
[ 22.430]
X.Org X Server 1.15.0
Release Date: 2013-12-27
[ 22.430] X Protocol Version 11, Revision 0
[ 22.430] Build Operating System: Linux 3.12.5-1-ARCH x86_64
[ 22.430] Current Operating System: Linux danny 3.13.7-1-ARCH #1 SMP PREEMPT Mon Mar 24 20:06:08 CET 2014 x86_64
[ 22.430] Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=ea5d97a1-a97f-4dce-b46c-b96ca60aa183 rw quiet cryptdevice=/dev/sda2:cryptroot
[ 22.430] Build Date: 09 January 2014 08:47:24AM
[ 22.430]
[ 22.430] Current version of pixman: 0.32.4
@Strubbl
Strubbl / share-disk.service
Last active August 29, 2015 14:05
systemd service unit for mounting a dm-crypt device
[Unit]
Description=Mount share disk when available
After=cryptsetup.target
ConditionPathExists=/dev/sda
ConditionPathIsDirectory=/media/share
ConditionFileIsExecutable=/usr/bin/cryptsetup
ConditionFileIsExecutable=/usr/bin/mount
ConditionFileNotEmpty=/etc/keys/share.key
[Service]
@Strubbl
Strubbl / config_sites.py
Created September 11, 2014 16:56
manual_rss'en
['OwncloudChangelog', 'http://owncloud.org/changelog/', '<body.*</body>', ['ignore string']],
['OSBNBlogs', 'http://osbn.de/alleblogs/', '<body.*</body>', ['ignore string']],
['AutosecPublications', 'http://www.autosec.org/publications.html', '<div id="content">.*</div>\s+<div id="footer">', ['ignore strings']],
['FacebookPlanB', 'https://www.facebook.com/pages/PlanB-die-bar/200016836750562', '<code class="hidden_elem" id="u_0_1j">.*</code>', ['ignore strings']],
@Strubbl
Strubbl / PKGBUILD
Last active August 29, 2015 14:06
xdcc-grabscher.pkgbuild
# Maintainer: Scott Campbell <@.com>
_pkgname=xdcc-grabscher
_solution=XG.sln
pkgname=$_pkgname-git
pkgver=3.2.0.0.r8.392e95e
pkgrel=1
pkgdesc="A XDCC download client."
arch=('i686' 'x86_64')
@Strubbl
Strubbl / version.json
Last active August 29, 2015 14:14
just another Cordova before_compile hook, to use app version from config.xml in your app
{
"version" : {
"MAJOR" : "0",
"MINOR" : "1",
"PATCH" : "0"
}
}
@Strubbl
Strubbl / fix.md
Last active January 30, 2017 19:33 — forked from nicosomb/fix.md
Fix for wallabag 2.2 and SQLite

After upgrading wallabag to 2.2, if you use SQLite for database, you may have a blank page or an internal server error (error 500). It can be due to migrations which failed.

The migrations which failed are migrations which try to create new columns on tables.

To fix this problem, please execute these commands on your webserver:

    php bin/console doctrine:migration:execute 20161024212538 -e=prod
    php bin/console doctrine:migration:execute 20161106113822 -e=prod