A heart created with D3 and a nice formula found on Wolfram to celebrate Valentine's Day!
import org.openrndr.application | |
import org.openrndr.color.ColorRGBa | |
import org.openrndr.draw.ColorFormat | |
import org.openrndr.draw.colorBuffer | |
import org.openrndr.draw.loadImage | |
import org.openrndr.draw.shadeStyle | |
import org.openrndr.extra.noise.poissonDiskSampling | |
import org.openrndr.extra.olive.oliveProgram | |
import org.openrndr.extras.easing.easeQuadIn | |
import org.openrndr.extras.easing.easeQuadInOut |
/** | |
* server/dataSources/Auth.js | |
* Auth implementation, it's not really a dataSource so it doesn't need to be here | |
*/ | |
const { authenticate, createJwt } = require('../lib/passport'); | |
const { ON_HTTPS } = require('../configs'); | |
const ONE_MINUTE = 1000 * 60; | |
const ONE_DAY = ONE_MINUTE * 60 * 24; | |
const ONE_MONTH = ONE_DAY * 30; |
data Graph = Graph | |
{ pointsLeft :: Set.Set (V2 Double) | |
-- ^ All the points in the whole graph left to be connected | |
, branches :: Set.Set LineSegment | |
-- ^ All branches we have found, connecting two points | |
, currentPoints :: [V2 Double] | |
-- ^ Points that are currently being processed | |
, maxDist :: Double | |
-- ^ Maximum distance a thing can be away from a thing | |
} |
# author: tmwhere.com | |
# --- third party dependencies | |
PIXI = require('pixi.dev') | |
_ = require('lodash') | |
noise = require('perlin').noise | |
Quadtree = require('quadtree').Quadtree | |
seedrandom = require('seedrandom') | |
# --- |
# Be sure to save your config files. Optional but I do: | |
sudo cp /etc/postgresql/9.3/main/postgresql.conf ~ | |
sudo cp /etc/postgresql/9.3/main/pg_hba.conf ~ | |
# Package repo (for apt-get) | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list.d/postgresql.list' | |
# Also probably optional but I like to update sources and upgrade | |
sudo apt-get update |
license: mit | |
height: 300 | |
scrolling: no | |
border: no |
A representation of the current time of year using the Sun, Earth, and Moon.
The position of the Earth in orbit around the Sun indicates the hour of year. The Earth itself is a pie chart indicating the second of day. The Moon's position in orbit around the Earth indicates the hour of month. The time is updated every second.
Copyright 2014 Clay Walker
MIT License
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
-
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the
secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection. -
Use production SSL certificates locally. This is annoying
CREATE OR REPLACE FUNCTION voronoi(table_name text,geom_col text) returns SETOF record as $$ | |
############################################################################# | |
# | |
# Voronoi diagram calculator/ Delaunay triangulator | |
# Translated to Python by Bill Simons | |
# September, 2005 | |
# | |
# Additional changes by Carson Farmer added November 2010 | |
# |