Skip to content

Instantly share code, notes, and snippets.

@boneskull
boneskull / README.md
Last active April 10, 2024 12:47
example of how to debug mocha v4 if hanging

Here's an example of how to debug Mocha v4 if it hangs.

Ensure you're using a Node.js 8 or newer (or any version with async_hooks support).

If you run your test, you'll notice it hangs:

$ mocha test.js
@jspahrsummers
jspahrsummers / GHReadWriteQueue.h
Last active December 22, 2016 16:15
Non-blocking mutual exclusion with readers and writers, for asynchronous operations that may span more than one GCD block (making a single concurrent GCD queue unsuitable).
//
// GHReadWriteQueue.h
// GitHub
//
// Created by Justin Spahr-Summers on 2014-03-24.
// Copyright (c) 2014 GitHub. All rights reserved.
//
#import <Foundation/Foundation.h>
@jeremiegirault
jeremiegirault / start_vnc.sh
Created August 23, 2012 13:42
start vnc server in compatibility mode on OSX
#!/bin/bash
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -restart -agent -privs -all -clientopts -setvnclegacy -vnclegacy -yes -setvncpw -vncpw somesecretpassword
@romannurik
romannurik / SwipeDismissListViewTouchListener.java
Last active May 1, 2021 10:16
**BETA** Android 4.0-style "Swipe to Dismiss" sample code
Moved to
https://github.com/romannurik/android-swipetodismiss