Skip to content

Instantly share code, notes, and snippets.

@Platane
Platane / insaneJMad
Last active April 17, 2023 06:58
pizza tracker database
1681714704620 ---
1514638800000 947948051842392065 64
1512830853000 939506812537245696 63
1512240460000 937030524127858688 61
1510962093000 931668661995233280 59
1510676832000 930472193112276993 58
1509734051000 926517882317692928 55
1509655297000 926187562544304129 54
1509152942000 924080534430670848 53
1508370536000 920798884921720832 50
@Platane
Platane / now-env.js
Last active September 18, 2019 14:10
add secret to now.sh
const util = require("util");
const exec = util.promisify(require("child_process").exec);
require("dotenv").config();
const p = require("./now.json");
const vars = Object.entries({ ...p.env, ...p.build.env })
.filter(([, b]) => b[0] === "@")
.map(([a, b]) => ({
@Platane
Platane / setEnv.js
Created July 23, 2019 12:01
Set the env var in circle project from a .env file
const fs = require("fs");
const https = require("https");
/**
*
* Set the env var in circle project from a .env file
*
* usage:
*
* ```bash
@Platane
Platane / perf-radar.js
Created December 3, 2018 13:33
perf radar
const N = 24;
const PI2 = Math.PI * 2;
const SIZE = 60;
const createSvgElement = elementName =>
document.createElementNS("http://www.w3.org/2000/svg", elementName);
/**
* prepare svg elements
*/
@Platane
Platane / arthur-brongniart.json
Last active March 21, 2017 16:35
linkedin profile
{
"experience": [
{
"company": {
"name": "Tracktl",
"logo_url": "https://media.licdn.com/media/AAEAAQAAAAAAAAXpAAAAJDI1ZWYzMzY4LWIzNmItNDE3ZC05ZTlmLTA4Mjk2OTA2MjY4Mg.png",
"linkedin_url": "https://www.linkedin.com/company-beta/3331997"
},
"media": [
{
@Platane
Platane / cli
Created March 6, 2017 14:52
write flow anotation from jsdoc comment block
jscodeshift --parser flow -t .\transform.js .\src
@Platane
Platane / babel-plugin-require-absolute.js
Last active October 12, 2016 08:30
babel plugin to make absolute path relative in require statement
const fs = require('fs')
const pathUtils = require('path')
const fileExist = function( path ){
try{
fs.accessSync( path )
return true
} catch( err ){
return false
### Keybase proof
I hereby claim:
* I am platane on github.
* I am platane (https://keybase.io/platane) on keybase.
* I have a public key whose fingerprint is 9E65 C8B9 39A7 7443 979F E827 CAE3 8FA8 9A0E 15E9
To claim this, I am signing this object:
#/bin/sh
# deploy script
# default options
incr="0.0.1"
versionMessage=""
# parse option
@Platane
Platane / gulpFile.js
Last active August 29, 2015 14:11
sort picture
var ExifImage = require('exif').ExifImage
, sizeOf = require('image-size')
, fs = require('fs')
, Promise = require("Promise")
var cp = function( src , dst ){
return new Promise(function(resolve, reject){
var contentBuffer = fs.readFileSync(src)
fs.writeFile( dst, contentBuffer, resolve )