Skip to content

Instantly share code, notes, and snippets.

@dterei
dterei / sasl_test.c
Created November 5, 2014 20:03
Libmemcached SASL authentication test
/*
* Test that libmemcached is built with SASL support.
*/
#include <stdio.h>
#include <libmemcached/memcached.h>
const char* key = "abc";
const char* value = "value";
// test basic get/set operation works.
@fadhlirahim
fadhlirahim / installing_supervisor_macosx.md
Last active December 31, 2023 14:45
Setting up supervisord in Mac OS X

Installation

Installing Supervisor on OS X is simple:

sudo pip install supervisor

This assumes you have pip. If you don't:

@henrik
henrik / bookmarklet.js
Last active August 28, 2016 08:22
Bookmarklet to enable saving full-size(?) images from Houzz.com.
// When triggered, adds a small image before other images that represents the full-size image.
// Drag-and-drop it, right-click and save, or click to open.
javascript:$("img.viewImage, img.currentImage, img.space, img[id^=galleryImg], img[class^=browseListImage], .gallery-photo img").each(function() { var newSrc = this.src.replace(/[fs]images\/(\d+).*/, 'simages/$1_0_9-.jpg'); $(this).parents("a").andSelf().first().before("<a href='"+newSrc+"'><img src='"+newSrc+"' width=50></a>") })
@nevyn
nevyn / NSObject+SPInvocationGrabbing.h
Created August 6, 2010 11:14
Spotify's invocation grabber, with some magic tricks
#import <Foundation/Foundation.h>
@interface SPInvocationGrabber : NSObject {
id _object;
NSInvocation *_invocation;
int frameCount;
char **frameStrings;
BOOL backgroundAfterForward;
BOOL onMainAfterForward;
BOOL waitUntilDone;