Skip to content

Instantly share code, notes, and snippets.

@lastday154
lastday154 / csv.js
Created June 6, 2018 02:14
busboy parse multi-part form lambda
'use strict';
const csv = require('csvtojson');
const stringToRow = (csvStr) => new Promise((resolve, reject) => {
csv({
noheader: true,
output: 'csv'
})
.fromString(csvStr)
@ksmithut
ksmithut / .dockerignore
Last active January 25, 2025 00:36
Node Docker Compose nodemon
node_modules
@BoKKeR
BoKKeR / blender.py
Created December 3, 2017 17:48
Python script that visualises the L3G4200D gyro sensor
import threading
import time
import bpy
import serial
import re
import sys
arduino = serial.Serial('COM4', 115200, timeout=.1)
class RotateCubeThread (threading.Thread):
@kisenka
kisenka / inmemory-webpack-compiler.js
Last active April 15, 2023 15:09
Webpack in-memory filesystem
var webpack = require('webpack');
var MemoryFS = require('memory-fs');
var SingleEntryDependency = require('webpack/lib/dependencies/SingleEntryDependency');
var fs = new MemoryFS();
fs.mkdirpSync('/src');
fs.writeFileSync('/src/app.js', 'require("./dep.js")', 'utf-8');
fs.writeFileSync('/src/dep.js', 'module.exports = function(msg){console.log(msg)}', 'utf-8');
fs.writeFileSync('/src/extra-entry.js', 'require("./dep.js")', 'utf-8');
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active March 23, 2026 00:03
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname