Skip to content

Instantly share code, notes, and snippets.

View runningskull's full-sized avatar

Juan Patten runningskull

View GitHub Profile
@steveruizok
steveruizok / getPerfectDashProps.ts
Last active February 19, 2024 00:38
Get balanced stroke dash array and stroke dash offset for an ellipse.
/**
* Get balanced dash-strokearray and dash-strokeoffset properties for a path of a given length.
* @param length The length of the path.
* @param strokeWidth The shape's stroke-width property.
* @param style The stroke's style: "dashed" or "dotted" (default "dashed").
* @param snap An interval for dashes (e.g. 4 will produce arrays with 4, 8, 16, etc dashes).
*/
export function getPerfectDashProps(
length: number,

Music for working, programming, reading, …

…sleeping, meditating, yoga, after hour…. Mostly ambient, drone, (neo-)classical, dub, minimal techno, deep house, micro house, downtempo, slo-mo house, ketapop, schneckno, jetlagdisco, post-rock, lowfi hip hop…

Please feel free to comment your recommendations.

@antirez
antirez / lmdb.tcl
Created April 28, 2017 15:40
LMDB -- First version of Redis written in Tcl
# LVDB - LLOOGG Memory DB
# Copyriht (C) 2009 Salvatore Sanfilippo <antirez@gmail.com>
# All Rights Reserved
# TODO
# - cron with cleanup of timedout clients, automatic dump
# - the dump should use array startsearch to write it line by line
# and may just use gets to read element by element and load the whole state.
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands.
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump!
Below I collected relevant links and papers more or less pertaining to the subject of tetrahedral meshes.
It's an ever-growing list.
------------------------------
Relevant links:
http://en.wikipedia.org/wiki/Types_of_mesh
http://en.wikipedia.org/wiki/Tetrahedron
http://en.wikipedia.org/wiki/Simplicial_complex
@runningskull
runningskull / delayreq.js
Created July 23, 2012 19:21
Redirect to a URL after a delay
var http = require('http')
, url = require('url')
,S = http.createServer(function(req, resp) {
var loc = {Location: url.parse(req.url).query}
setTimeout(function() {
resp.writeHead(301, loc), resp.end()
}, 3000)
}).listen(5000)