Skip to content

Instantly share code, notes, and snippets.

@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
@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:

@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
@XVilka
XVilka / TrueColour.md
Last active April 8, 2024 14:02
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@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!
@jakevdp
jakevdp / CategoricalCMAP.ipynb
Last active February 14, 2024 18:00
Example of a categorical color map in matplotlib
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bishboria
bishboria / springer-free-maths-books.md
Last active April 25, 2024 06:27
Springer made a bunch of books available for free, these were the direct links
@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"
}
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

@lifepillar
lifepillar / 24-bit-color.sh
Created November 20, 2017 11:48
Test 24 bit colors in terminals
#!/bin/bash
#
# This file echoes a bunch of 24-bit color codes
# to the terminal to demonstrate its functionality.
# The foreground escape sequence is ^[38;2;<r>;<g>;<b>m
# The background escape sequence is ^[48;2;<r>;<g>;<b>m
# <r> <g> <b> range from 0 to 255 inclusive.
# The escape sequence ^[0m returns output to default
setBackgroundColor()