A little D3js demo of a clock based on circle segments, more normally used for creating pie charts. I've speeded up time to 1 second == 1 hour to make it a little more visually interesting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from the QTRecorder sample application in the MonoMac source | |
// In QTRDocument contructor .... | |
// ---- Add image capture output | |
var decompressedVideoOuput = new QTCaptureDecompressedVideoOutput(); | |
NSError error2; | |
decompressedVideoOuput.DidOutputVideoFrame += (sender, e) => | |
{ | |
// var frame = e.SampleBuffer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[<Test>] | |
[<Explicit>] | |
let ``get hostname`` () = | |
ssh (print <!> hostname) | |
[<Test>] | |
[<Explicit>] | |
let ``should be able to put a file on the nginx server`` () = | |
scp (putFile testFileName content) | |
ssh (reader { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ReSharper disable InconsistentNaming | |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using EasyNetQ.ConnectionString; | |
using EasyNetQ.Loggers; | |
using EasyNetQ.Producer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace Mike.Spikes.Threading | |
{ | |
public class ManyWaysToStartAThread | |
{ | |
public void WithThread() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Newton's law of universal gravitation: | |
http://en.wikipedia.org/wiki/Newton%27s_law_of_universal_gravitation | |
F = G(m1 * m2)/r^2 | |
Mass of the Earth: 5.97219 × 10^24 kg | |
Mass of the Moon: 7.3477 × 10^22 kg | |
Distance to the Moon (average): 384,400 km |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Send a message directly to a queue | |
/// </summary> | |
/// <typeparam name="T">The type of message to send</typeparam> | |
/// <param name="queue">The queue to send to</param> | |
/// <param name="message">The message</param> | |
void Send<T>(string queue, T message); | |
/// <summary> | |
/// Receive messages from a queue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nornagon/postgres | |
MAINTAINER [email protected] | |
ADD sql sql | |
ADD create_db.sh /src/ | |
USER postgres | |
RUN /src/create_db.sh |
The results of playing with building graphs using D3js. This doesn't really predict your awesomeness over the next 100 days, it's entirely random, so if you don't like the results, just hit refresh to see if you get a better prediction :)
Example of a D3js time series graph with X,Y crosshairs and a threshold line. Just copy the drawLineGraph function and call it with your data. The data shoud be an array of two element arrays. Something like:
var data = [
[new Date(2014, 01, 10), 404],
[new Date(2014, 01, 11), 123],
[new Date(2014, 01, 12), 666]
];
var warnLine = { lineValue: 200, label: 'my important threshold' };