Skip to content

Instantly share code, notes, and snippets.

@marcello3d
marcello3d / common.frag
Created May 20, 2022 21:15
2d vector library in webgl by paniq (public domain) - https://www.shadertoy.com/view/lslXW8
// 2d vector graphics library (https://www.shadertoy.com/view/lslXW8)
// after Cairo API, with anti-aliasing
// by Leonard Ritter (@paniq)
// v0.16
// I release this into the public domain.
// some estimators have been lifted from other shaders and are not
// necessarily PD licensed, note the links in the source code comments below.
// 2020-12-02: 0.16
@marcello3d
marcello3d / gist:4e88b9af81b6c0e49b6e
Last active April 14, 2020 08:51
iOS Helvetica Neue Test
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimal-ui">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="mobile-web-app-capable" content="yes">
<style>
html,body {
@marcello3d
marcello3d / bson-benchmark.js
Created November 14, 2011 15:22
mongodb-native vs node-buffalo benchmark
var BSON = require('../buffalo'),
BSONPure = require('mongodb').BSONPure.BSON//,
// BSONNative = require('mongodb').BSONNative.BSON
var COUNT = 100000
var object = {
string: "Strings are great",
decimal: 3.14159265,
bool: true,
integer: 5,
@marcello3d
marcello3d / launcher.js
Created March 28, 2011 02:59
little node.js reloader
/*
* This file is part of the Spludo Framework.
* Copyright (c) 2009-2010 DracoBlue, http://dracoblue.net/
*
* Licensed under the terms of MIT License. For the full copyright and license
* information, please see the LICENSE file in the root folder.
*/
/*
* based on https://github.com/DracoBlue/spludo/blob/master/build/run_dev_server.js
@marcello3d
marcello3d / log.js
Created March 24, 2011 03:45
simple log4js wrapper
var log4js = require('log4js')()
log4js.addAppender(log4js.consoleAppender())
/**
* Get a logger. If no name is specified, retrieve the caller's filename
* example:
* var log = require('./log.js')()
*/
module.exports = function(name) {
if (!name) {
function addRoute(app, path, controllerName) {
var controller = require("./controllers/" + (controllerName || path) )
['get','post','put','delete','all'].forEach(function (method) {
if (controller[method]) {
app[method](path, controller[method])
}
})
}
var fs = require("fs")
var sprintf = require('sprintf').sprintf
fs.readFile(__dirname+"/npmdump.json", function (err, data) {
if (err) throw err
var packages = JSON.parse(data)
fs.readFile("../output.json", function (err, data) {
if (err) throw err
@marcello3d
marcello3d / gist:854219
Created March 4, 2011 05:23
nithub (npmjs + github) keyword deathmatch!
ace KEYWORD DEATHMATCH
1. ace 829 score - https://github.com/ajaxorg/ace
2. vice 8 score - https://github.com/Gozala/vice
amazon KEYWORD DEATHMATCH
1. aws-lib 105 score - https://github.com/mirkok/aws-lib
2. simpledb 14 score - https://github.com/rjrodger/simpledb
3. aws 2 score - https://github.com/teemow/node-aws
apache KEYWORD DEATHMATCH
@marcello3d
marcello3d / gist:854199
Created March 4, 2011 05:01
nithub (npm + github)
Top 50 githubbed npm modules by watchers:
1. cloud9 1349 watchers - https://github.com/ajaxorg/cloud9
2. socket.io 1089 watchers - https://github.com/LearnBoost/Socket.IO-node
3. dryice 956 watchers - https://github.com/isaacs/npm
4. npm 956 watchers - https://github.com/isaacs/npm
5. connect 948 watchers - https://github.com/senchalabs/connect
6. yui3-mocha 931 watchers - https://github.com/yui/yui3
7. yui3-core 931 watchers - https://github.com/yui/yui3
8. ukijs 663 watchers - https://github.com/voloko/uki
9. fab 539 watchers - https://github.com/jed/fab
@marcello3d
marcello3d / gist:854171
Created March 4, 2011 04:33
npm - github stats
[
{
"name": "ace",
"url": "https://github.com/ajaxorg/ace",
"description": "Ajax.org Cloud9 Editor",
"watchers": 415,
"forks": 84
},
{
"name": "actor",