Skip to content

Instantly share code, notes, and snippets.

@mariussturm
mariussturm / gist:061b9f4861ef1292aa60
Last active February 1, 2017 13:16
How to pair Firefox 29 with Owncloud's mozilla_sync / Weave
_Go to your Owncloud installation <https://myowncloud/remote.php/mozilla_sync> and accept the SSL Certificate
_Open about:config
_Create: services.sync.username <string> the value should be a hash not the username itself. (You only need the hash if the
sync was setup with a pre FF29, if you start from scratch the string doesn't matter)
You can look this up in an older browser or in the logs of your Owncloud server!!
_Go to: Preferences -> Sync -> Setup Firefox sync (you should see the old UI now)
'I Have an Account'
'I don't have the device with me'
'Account' - again use the hash NOT the actual username!
anonymous
anonymous / README.md
Created June 14, 2017 17:23

Über 80.000 Bücher zum einfachen Download oder Warum md5(reverse(userid)) kein guter DRM-Key ist

2014 startete "DIE GRATIS EBOOK FLATRATE" (Eigenschreibweise) Readfy, die sich anschickte, das Spotify für Bücher zu werden. Das Modell ist simpel: über die Android- und iOS-App können eBooks kostenlos gelesen werden, dafür wird permanent Werbung angezeigt (1 Banner sowie Videos alle paar Seiten). (Inzwischen können Bücher auch für 0.99€-4.99€ gemietet und dann werbefrei und offline gelesen werden.) So gut es klingt, gibt es damit einige offensichtliche Probleme: Die App funktioniert nur online (nach 2min geht sonst das Buch zu), die Werbung nervt und die Bücher können nur mit einer App und nur auf bestimmten Geräten gelesen werden. Und weil das so ja nicht schön ist, habe ich mir gedacht, dass ich mir ja mal anschauen kann, wie die App funktioniert, und ob da nicht irgendwo ePubs rausfallen.

tl;dr

@n0rc
n0rc / tinc-graph.wsgi
Last active January 13, 2018 19:08
wsgi script to get the current tinc graph as png image
# coding: utf-8
import os
import re
import time
from subprocess import Popen, PIPE, check_output
from urlparse import parse_qs
re_filter = re.compile(r' \w+ \[label = "[^"]+", color = "red"];\n')
@paulirish
paulirish / appmanifest_221380.acf
Created January 3, 2016 22:43
Trick for downloading AOE2 HD game data on Linux/Mac. Download file to ~/.steam/steam/SteamApps or ~/Library/Application Support/Steam/steamapps. Then restart Steam
"AppState"
{
"AppID" "221380"
"Universe" "1"
"StateFlags" "1026"
}
@ritiek
ritiek / README.md
Last active May 10, 2021 15:39
Controlling mpris supported players (like mpsyt) on a headless Raspberry Pi with playerctl
sudo apt install -y dbus 
wget http://raspbian.raspberrypi.org/raspbian/pool/main/p/playerctl/libplayerctl-dev_2.0.1-1_armhf.deb
wget http://raspbian.raspberrypi.org/raspbian/pool/main/p/playerctl/gir1.2-playerctl-2.0_2.0.1-1_armhf.deb
wget http://raspbian.raspberrypi.org/raspbian/pool/main/p/playerctl/libplayerctl2_2.0.1-1_armhf.deb
wget http://raspbian.raspberrypi.org/raspbian/pool/main/p/playerctl/playerctl_2.0.1-1_armhf.deb
sudo dpkg -i libplayerctl-dev_2.0.1-1_armhf.deb
sudo dpkg -i gir1.2-playerctl-2.0_2.0.1-1_armhf.deb
sudo dpkg -i libplayerctl2_2.0.1-1_armhf.deb
sudo dpkg -i playerctl_2.0.1-1_armhf.deb
@afternoon
afternoon / rrdxml.py
Created April 28, 2011 20:45
Dump RRD XML to CSV
#!/usr/bin/env python
"""Export CSV from an RRD XML dump.
Usage: rrdxml.py file.xml rra
Where rra is the 0-based index for the RRA you want to dump.
"""
from csv import writer
from itertools import chain, izip
@blachniet
blachniet / k8s.conf
Created May 21, 2020 03:52
Ansible playbook to install Minikube on a VM with the "none" driver. Add your inventory in a file named `hosts`, then execute the playbook with `ansible-playbook --ask-become-pass -i hosts ./playbook.yml`
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
@kkm000
kkm000 / ssh-agent-headless.service
Last active October 18, 2022 19:54
Sharing ssh-agent between multiple remote command-line sessions
# -*- mode: conf-unix; -*-
# SPDX-License-Identifier: Unlicense OR CC0-1.0 OR Apache-2.0 OR WTFPL
# ~/.config/systemd/user/ssh-agent-headless.service
#
# Written by Kirill 'kkm' Katsnelson in 2018 and dedicated to public domain. If
# public domain is not recognized in your jurisdiction, use any of the licenses
# listed above that suit you the best.
#
# This is a per-user service to run ssh-agent(1) under a systemd user's service,
# shared by all sessions of this user. Many distros come with a service
@olivier-m
olivier-m / adb.sh
Created August 10, 2013 12:05
Remove all Google apps from an android phone. List of delete files from http://forum.xda-developers.com/showthread.php?t=1969755
# With your phone in debug mode, etc.
adb start-server
adb remount
adb shell < remove.sh
@joergschiller
joergschiller / a2dp_sink_ubuntu_linux.md
Created January 24, 2012 23:05
A2DP Sink on Ubuntu Linux with bluez (streaming bluetooth stereo audio from smartphone to pc)

Howto Enable and Use A2DP Sink on Ubuntu Linux with Bluez

  1. Add Enable=Source to /etc/bluetooth/audio.conf right after [General].

  2. Find address in form XX:XX:XX:XX:XX:XX of phone with hcitool scan.

  3. Pair and trust smartphone with sudo bluez-simple-agent hci0 XX:XX:XX:XX:XX:XX and sudo bluez-test-device trusted XX:XX:XX:XX:XX:XX yes.

  4. Create loopback in pulseaudio connection bluetooth a2dp source with alsa sink: