Skip to content

Instantly share code, notes, and snippets.

@willurd
willurd / web-servers.md
Last active July 22, 2024 15:25
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@SMUsamaShah
SMUsamaShah / List of JavaScript GUI libraries.md
Last active July 17, 2024 11:39
dat.gui alternatives to create GUI from JavaScript object

JavaScript GUI libraries

These libraries can be used to quickly create a GUI for configureable parameters using sliders, checkboxes, colors pickers etc

  1. Tweakpane https://github.com/cocopon/tweakpane Demo: https://cocopon.github.io/tweakpane/
  2. control-panel https://github.com/freeman-lab/control-panel
  3. ControlKit https://github.com/automat/controlkit.js
  4. guify https://github.com/colejd/guify Main site is down, here is the demo https://jons.website/projects/guify/index
  5. oui https://github.com/wearekuva/oui
  6. Palette.js https://github.com/lehni/palette.js
@taichi
taichi / hello.test.ts
Created October 31, 2018 09:04
TypeScript + Jest + power-assert
import assert = require('assert');
it("hello", () => {
assert.equal({geeting:"WayWayWa", Fu:{Ho:1}},
{ greeting: "Hello", Fu:{Fe:1}});
});
@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active July 14, 2024 18:01
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@tomhicks
tomhicks / plink-plonk.js
Last active July 22, 2024 09:51
Listen to your web pages
@mjclemente
mjclemente / 20190417131115_test-setup.ts
Created July 21, 2020 17:39 — forked from jukkatupamaki/20190417131115_test-setup.ts
Knex.js & TypeScript config example · How to setup Knex.js in a TypeScript project
import * as Knex from 'knex';
export async function up(knex: Knex): Promise<any> {
return knex.schema.createTable('test_setup', (table: Knex.TableBuilder) => {
table.integer('foobar');
});
}
export async function down(knex: Knex): Promise<any> {
return knex.schema.dropTable('test_setup');
@0beqz
0beqz / BoxProjectedEnvMapHelper.js
Last active February 29, 2024 01:45
Updated code to box-project env-maps in three.js (r137) - credits go to codercat (https://codercat.tk) for the box-projecting code
import * as THREE from "three"
// credits for the box-projecting shader code go to codercat (https://codercat.tk)
const worldposReplace = /* glsl */`
#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )
vec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );
#ifdef BOX_PROJECTED_ENV_MAP
vWorldPosition = worldPosition.xyz;