Skip to content

Instantly share code, notes, and snippets.

View turner's full-sized avatar

Douglass Turner turner

  • Elastic Image Software LLC
  • Lexington, MA USA 02421
  • X @dugla
View GitHub Profile
@mbostock
mbostock / .block
Last active April 3, 2020 23:49
Pan & Zoom Axes
license: gpl-3.0
redirect: https://observablehq.com/@d3/zoomable-scatterplot
@staltz
staltz / introrx.md
Last active September 16, 2024 07:18
The introduction to Reactive Programming you've been missing
@haggen
haggen / apple-crayon.scss
Last active July 22, 2024 17:35
Apple Crayon Palette RGB values in SASS
// Apple Crayon Palette RGB
$cantaloupe: rgb(255, 206, 110);
$honeydew: rgb(206, 250, 110);
$spindrift: rgb(104, 251, 208);
$sky: rgb(106, 207, 255);
$lavender: rgb(210, 120, 255);
$carnation: rgb(255, 127, 211);
$licorice: rgb(0, 0, 0);
$snow: rgb(255, 255, 255);
@billdwhite
billdwhite / index.html
Last active August 4, 2023 21:14
d3 Virtual Scrolling Plugin
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Virtual Scrolling Demo</title>
<style>
html, body {
width: 100%;
height: 100%;
margin: 0;
var keywords_color_regex = /^[a-z]*$/;
var hex_color_regex = /^#[0-9a-f]{3}([0-9a-f]{3})?$/;
var rgb_color_regex = /^rgb\(\s*(0|[1-9]\d?|1\d\d?|2[0-4]\d|25[0-5])%?\s*,\s*(0|[1-9]\d?|1\d\d?|2[0-4]\d|25[0-5])%?\s*,\s*(0|[1-9]\d?|1\d\d?|2[0-4]\d|25[0-5])%?\s*\)$/;
var rgba_color_regex = /^rgba\(\s*(0|[1-9]\d?|1\d\d?|2[0-4]\d|25[0-5])%?\s*,\s*(0|[1-9]\d?|1\d\d?|2[0-4]\d|25[0-5])%?\s*,\s*(0|[1-9]\d?|1\d\d?|2[0-4]\d|25[0-5])%?\s*,\s*((0.[1-9])|[01])\s*\)$/;
var hsl_color_regex = /^hsl\(\s*(0|[1-9]\d?|[12]\d\d|3[0-5]\d)\s*,\s*((0|[1-9]\d?|100)%)\s*,\s*((0|[1-9]\d?|100)%)\s*\)$/;
@kerryrodden
kerryrodden / .block
Last active August 4, 2024 14:51
Sequences sunburst
license: apache-2.0
@jbenet
jbenet / simple-git-branching-model.md
Last active September 2, 2024 12:02
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@alejandro-isaza
alejandro-isaza / gist:5717438
Last active June 22, 2017 09:51
UIImage category to normalize image orientation by rotating an image so that it's orientation is UIImageOrientationUp. Based on http://stackoverflow.com/questions/5427656/ios-uiimagepickercontroller-result-image-orientation-after-upload/5427890#10611036
@interface UIImage (Orientation)
- (UIImage*)imageByNormalizingOrientation;
@end
@implementation UIImage (Orientation)
- (UIImage*)imageByNormalizingOrientation {
@mbostock
mbostock / .block
Last active February 9, 2016 00:45
D3 and Custom Data Attributes
license: gpl-3.0
@Jaybles
Jaybles / UIDeviceHardware.h
Created October 28, 2011 19:33
UIDeviceHardware - Determine iOS device being used
//
// UIDeviceHardware.h
//
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
- (NSString *) platform;