Skip to content

Instantly share code, notes, and snippets.

View muesli's full-sized avatar

Christian Muehlhaeuser muesli

View GitHub Profile
@xhochy
xhochy / Proposal.md
Last active December 16, 2015 02:49
Control API and Tomahawk Apps

Tomahawk Apps

  • Integrate the same concept as Spotify Apps, but a bit more flexible (not only Apps, but more of a plugin-system)
  • HTML5+JavaScript
  • QWebkit View inside Tomahawk
  • Can have an entry in the TreeView on the left side in "Apps -> " and declare subentries
  • Add addtional functionality such as: ** Custom sharing ** Charts
@xhochy
xhochy / gist:5377824
Created April 13, 2013 10:08
Tomahawk Web-API Auth Process

(Client == Process talking to the Tomahawk instance)

  • Client requests auth via GET /2/access/request_auth
  • Client indicates that it requires Authorization in the running Tomahawk instance and provides it UUID to the User
  • User sees authorization request in JobView and accepts it (for headless instances: tomahawk --grant-api-access <UUID>
  • Tomahawk indicates granted access to the client / Client polls if it has been granted access.
  • Tomahawk stores the UUID and some additional information (e.g. client name) in its DB
@wa0x6e
wa0x6e / README.md
Last active December 23, 2015 01:59
Redis widget for Dashing

Redis widget for Dashing

Description

Redis dashing widget to display the number of connected clients to a redis server, as well as the instance memory usage.

Dependencies

@rotzbouw
rotzbouw / clucene.patch
Created November 13, 2013 20:18
Fixes CLucene compilation on OS X 10.9
diff --git a/src/shared/CLucene/LuceneThreads.h b/src/shared/CLucene/LuceneThreads.h
index 97072ee..297cdef 100644
--- a/src/shared/CLucene/LuceneThreads.h
+++ b/src/shared/CLucene/LuceneThreads.h
@@ -7,6 +7,9 @@
#ifndef _LuceneThreads_h
#define _LuceneThreads_h
+#if defined(_CL_HAVE_PTHREAD)
+ #include <pthread.h>
@steintore
steintore / Readme.md
Last active June 21, 2017 21:08
Build status and progress widget for Dashing

Description

Dashing widget to display a Jenkins build status and build progress

The widget is based on the meter-widget which is default in the Dashing installation

The widget can also see the progress of a "pre-build", i.e if you have a job triggering the actual build you want to define, you can configure this job in the jenkins_build.rb as a prebuild.

For more information, please see Coding Like a tosser

@fm3
fm3 / ff57-tabs-mousewheel.js
Last active June 13, 2018 07:13 — forked from benoitryder/ff57-tabs-mousewheel.js
Change tabs with mousewheel in Firefox 58
/* To enable changing tabs by using the mouse wheel,
* enter this code into the browser console (Ctrl+Shift+J) */
var onTabWheel = function(ev) {
if (ev.deltaMode == 1 /* DOM_DELTA_LINE */) {
var idx = gBrowser.tabContainer.getIndexOfItem(gBrowser.selectedTab);
var direction = ev.deltaY > 0 ? 1 : -1;
gBrowser.selectTabAtIndex((idx + direction) % gBrowser.tabs.length);
}
}
package main
import (
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"plugin"
#!/bin/sh
set -x
# adb shell pm list packages -d
# adb shell pm list packages
adb shell pm uninstall -k --user 0 com.sonymobile.entrance
adb shell pm uninstall -k --user 0 com.sonymobile.xperiatransfermobile
adb shell pm uninstall -k --user 0 com.sonymobile.phoneusage
adb shell pm uninstall -k --user 0 com.sonymobile.googleanalyticsproxy
@otobrglez
otobrglez / Article.rb
Created July 12, 2011 20:51
Finding related articles using Jaccard index and tags
# This method finds related articles using Jaccard index (optimized for PostgreSQL).
# More info: http://en.wikipedia.org/wiki/Jaccard_index
class Article < ActiveRecord::Base
def related(limit=10)
Article.find_by_sql(%Q{
SELECT
a.*,
( SELECT array_agg(t.name) FROM taggings tg, tags t
@penguwin
penguwin / pre-push
Last active December 29, 2020 14:50
A git hook to prevent force pushing on master
#!/bin/bash
# Per-repo installation
# 1. Place this file in `.git/hooks/pre-push`
# 2. `chmod +x` it
clippy='
_________________________________________
/ It looks like youre trying to force \
| push on master... |