Skip to content

Instantly share code, notes, and snippets.

@dougnukem
dougnukem / BlockingQueue.java
Created September 25, 2011 23:32
Example Threadsafe BlockingQueue implementation in Java
public class BlockingQueue implements Queue {
private java.util.Queue queue = new java.util.LinkedList();
/**
* Make a blocking Dequeue call so that we'll only return when the queue has
* something on it, otherwise we'll wait until something is put on it.
*
* @returns This will return null if the thread wait() call is interrupted.
*/
@dougnukem
dougnukem / gist:3611366
Created September 3, 2012 17:54
Flash Builder 4.7 Installation Error
Exit Code: 6
Please see specific errors and warnings below for troubleshooting. For example, ERROR: DF027, DW063 ... WARNING: DS013 ...
-------------------------------------- Summary --------------------------------------
- 0 fatal error(s), 87 error(s), 3 warning(s)
WARNING: DS013: Payload {29D6DE4A-F62B-4637-B101-5D022E54C4F5} Adobe Flash Builder 4.6.1.0 is already installed and the session payload {1CB40DC9-0D9D-4458-8610-336DAA65655A} Adobe Flash Builder 4.7.0.0 has no upgrade/conflict relationship with it.
WARNING: DS013: Payload {EC6BD880-BAB1-4008-8941-57A33479E0A0} AIR for Apple iOS support (FB) 3.1.0.0 is already installed and the session payload {C3D9FE28-554D-4210-8FA4-2B5E78C529BF} AIR for Apple iOS support (FB) 3.1.0.0 has no upgrade/conflict relationship with it.
WARNING: DS013: Checking payloads upgrade/conflict relationships : Failed with code 1
----------- Payload: {168E1BC7-E1CD-4A10-B91F-8B9F8B7BE642} Adobe Flash Builder 4.7 4.7.0.0 -----------
Testing out the Gist stuff!
igigigiTesting out the Gist stuff!
Testing out the Gist stuff!
@dougnukem
dougnukem / device console
Created June 13, 2013 16:24
solstice iOS 7.0 crash
Jun 13 12:16:13 dougnukem-iphone5 backboardd[28] <Warning>: solstice[142] has active assertions beyond permitted time:
{(
<BKProcessAssertion: 0x17e69ea0> identifier: Suspending process: solstice[142] permittedBackgroundDuration: 10.000000 reason: suspend owner pid:28 preventSuspend preventThrottleDownCPU preventThrottleDownUI preventSuspendOnSleep
)}
Jun 13 12:16:13 dougnukem-iphone5 backboardd[28] <Warning>: Forcing crash report of solstice[142]...
Jun 13 12:16:13 dougnukem-iphone5 backboardd[28] <Warning>: Finished crash reporting.
Jun 13 12:16:13 dougnukem-iphone5 ReportCrash[163] <Error>: libMobileGestalt MobileGestalt.c:240: string Carrier is not a valid gestalt question
Jun 13 12:16:13 dougnukem-iphone5 com.apple.launchd[1] (UIKitApplication:com.zynga.solstice[0xef3c][142]) <Notice>: (UIKitApplication:com.zynga.solstice[0xef3c]) Exited: Killed: 9
Jun 13 12:16:13 dougnukem-iphone5 backboardd[28] <Warning>: Application 'UIKitApplication:com.zynga.solstice[0xef3c]' exited abnormally with sig
Time Priority Description
Tue Aug 06 21:25:33 2013 Notice (6) TLV-11 - unrecognized OID;CM-MAC=e4:83:99:a7:2f:f3;CMTS-MAC=00:13:5f:04:fb:9f;CM-QOS=1.1;CM-VER=3.0;
Tue Aug 06 21:25:33 2013 Error (4) Missing BP Configuration Setting TLV Type: 17.9;CM-MAC=e4:83:99:a7:2f:f3;CMTS-MAC=00:13:5f:04:fb:9f;CM-QOS=1.1;CM-VER=3.0;
Tue Aug 06 21:25:33 2013 Error (4) Missing BP Configuration Setting TLV Type: 17.8;CM-MAC=e4:83:99:a7:2f:f3;CMTS-MAC=00:13:5f:04:fb:9f;CM-QOS=1.1;CM-VER=3.0;
Time Not Established Warning (5) DHCP WARNING - Non-critical field invalid in response ;CM-MAC=e4:83:99:a7:2f:f3;CMTS-MAC=00:13:5f:04:fb:9f;CM-QOS=1.0;CM-VER=3.0;
Time Not Established Critical (3) No Ranging Response received - T3 time-out
Time Not Established Critical (3) SYNC Timing Synchronization failure - Failed to acquire QAM/QPSK symbol timing;;CM-MAC=e4:83:99:a7:2f:f3;CMTS-MAC=00:00:00:00:00:00;CM-QOS=1.0;CM-VER=3.0;
Mon Aug 05 17:02:38 2013 Critical (3) Started Unicast Maintenanc
@dougnukem
dougnukem / README.md
Created September 19, 2013 15:59 — forked from mbostock/.block

From Wikipedia:

Epicyclic gearing or planetary gearing is a gear system consisting of one or more outer gears, or planet gears, revolving about a central, or sun gear. … Epicyclic gearing systems also incorporate the use of an outer ring gear or annulus, which meshes with the planet gears.

Use the menu in the top-left to change the frame of reference, fixing the specified gear in-place.

Example TogetherJS App

Just testing it out.

@dougnukem
dougnukem / 0_reuse_code.js
Created October 8, 2013 18:40
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console