Skip to content

Instantly share code, notes, and snippets.

View muesli's full-sized avatar

Christian Muehlhaeuser muesli

View GitHub Profile
@jonmcclung
jonmcclung / Toast.qml
Last active January 27, 2024 12:07
Toast in QML. This implementation creates black toast with white text that appears at the bottom of the screen. It also supports adding multiple toast at a time using ToastManager with the newest toast at the bottom.
import QtQuick 2.0
/**
* adapted from StackOverflow:
* http://stackoverflow.com/questions/26879266/make-toast-in-android-by-qml
*/
/**
* @brief An Android-like timed message text in a box that self-destroys when finished if desired
*/
@jonhoo
jonhoo / README.md
Last active July 19, 2021 10:49
Distributed RWMutex in Go
@kachayev
kachayev / concurrency-in-go.md
Last active March 11, 2024 11:27
Channels Are Not Enough or Why Pipelining Is Not That Easy
@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() {
@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

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

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

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