Skip to content

Instantly share code, notes, and snippets.

View muesli's full-sized avatar

Christian Muehlhaeuser muesli

View GitHub Profile
@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
@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

@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
@bryanhunter
bryanhunter / MonokaiSW.md
Last active October 15, 2021 08:12
Mapping colors of the Monokai color scheme to their nearest Sherwin-Williams paint color
@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>
@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!

@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@jmoiron
jmoiron / 01-curl.go
Last active December 16, 2022 10:34
io.Reader & io.Writer fun
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func init() {