Skip to content

Instantly share code, notes, and snippets.

@taseenb
taseenb / api-head.js
Created January 11, 2021 14:38
API head
export default {
id: 999,
url: 'heads/beta/999',
landmarks: [
{
x: -57.973335266113,
y: 15.234729766846,
z: 63.960872650146
},
{
@taseenb
taseenb / flatten.js
Created April 5, 2020 00:36
Flatten an array
function flatten (a) {
const f = []
function fn (arr) {
const n = arr.length
let _f = []
for (let i=0;i<n;i++) {
const val = arr[i]
if (Array.isArray(val)) {
@taseenb
taseenb / prune-node_modules.sh
Created March 12, 2019 13:59
Prune all node_module folders
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
@taseenb
taseenb / index.html
Last active November 25, 2018 15:53
BTCUSD Bitfinex, BTCGBP Coinbase, Bitmex
<!--
https://gistpreview.github.io/?a3421381d1c203e9dbb339cb8c74b103/
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
@taseenb
taseenb / cloudSettings
Last active June 20, 2021 23:06
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-06-20T23:06:10.889Z","extensionVersion":"v3.4.3"}
@taseenb
taseenb / BTCUSD
Last active May 20, 2018 23:09
BTCUSD
<!--
https://gistpreview.github.io/?86e358a8f912f084b8dfb2de4794b71c/
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
# Generates random walking spline curves in Blender (2.79)
# Curve creation code pinched from https://blender.stackexchange.com/a/6751
# ello.co/desmarkie
import bpy
import bmesh
import random
from mathutils import Vector
from mathutils import Euler
@taseenb
taseenb / webpack-node.config.js
Created October 29, 2017 20:22
Webpack configuration for Node.js (works on Heroku)
import path from 'path'
import webpack from 'webpack'
import nodeExternals from 'webpack-node-externals'
export default env => {
return {
entry: './src/server/index.js',
output: {
path: path.join(__dirname, '/../server'),
filename: 'index.js'
@taseenb
taseenb / MeshCustomMaterial.js
Created September 25, 2017 22:30 — forked from mattdesl/MeshCustomMaterial.js
Custom mesh standard material with glslify + ThreeJS r83dev
const glslify = require('glslify');
const path = require('path');
// This is the original source, we will copy + paste it for our own GLSL
// const vertexShader = THREE.ShaderChunk.meshphysical_vert;
// const fragmentShader = THREE.ShaderChunk.meshphysical_frag;
// Our custom shaders
const fragmentShader = glslify(path.resolve(__dirname, 'standard.frag'));
const vertexShader = glslify(path.resolve(__dirname, 'standard.vert'));
@taseenb
taseenb / index.html
Last active August 29, 2015 13:58
JS simple extendable instances
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width" />
<title>funky</title>
</head>
<body>
<script src="script.js"></script>