A Pen by Dirk van Oosterbosch on CodePen.
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
<html> | |
<head> | |
</head> | |
<body> | |
<div class="wrap"> | |
<div class="half"> | |
<div class="colorPicker"></div> | |
</div> | |
<div class="half readout"> | |
<h1>Snap into fixed palette</h1> |
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
#!/usr/bin/env python | |
import time | |
def main(): | |
print("Start program") | |
# Initialize variables | |
sequence = [ | |
{ 't': 1.0, 'msg': "Yakayak 1"}, | |
{ 't': 1.8, 'msg': "Yakayak 2"}, |
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
class BaseImageProcessor { | |
func createARGBBitmapContext(image: CGImage) -> CGContext? { | |
let pixelWidth = image.width | |
let pixelHeight = image.height | |
let bitmapBytesPerRow = pixelWidth * 4 | |
let bitmapByteCount = bitmapBytesPerRow * pixelHeight | |
let bitmapData: UnsafeMutableRawPointer = malloc(bitmapByteCount) | |
let colorSpace: CGColorSpace = CGColorSpaceCreateDeviceRGB() |
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
#!/bin/bash | |
if [ "$1" = "-l" ] || [ "$1" = "--line" ] ; then | |
line=$2 | |
file=$3 | |
else | |
line=1 | |
file=$1 | |
fi |
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
# getStreets.py | |
# Example script that demonstrates how to get the geometry data out of a 'shapefile' | |
# A shapefile is a combination of .shp, .dbf, and .shx files, describing | |
# the (vector) shapes of geographic "features" (roads, bridges, lakes, etc) | |
# The following example deals with roads (in the Netherlands) | |
# (To make this script work, you'll have to download the shapefile for roads | |
# in the Netherlands and put these files in the same location as this file.) |