Skip to content

Instantly share code, notes, and snippets.

View CarlosLunaGit's full-sized avatar
🎯
Focusing

Carlos Luna CarlosLunaGit

🎯
Focusing
  • Sweden
  • 14:37 (UTC +01:00)
View GitHub Profile
const el = document.querySelector(".item");
let isResizing = false;
el.addEventListener("mousedown", mousedown);
function mousedown(e) {
window.addEventListener("mousemove", mousemove);
window.addEventListener("mouseup", mouseup);
@akirattii
akirattii / example-read-write-mysql-blob.js
Created April 17, 2018 05:47
node-mysql example: How to write & read BLOB
/*
DDL:
CREATE TABLE `bindata` (
`id` INT NOT NULL AUTO_INCREMENT,
`data` BLOB,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
*/
const fs = require("fs");
@oakfang
oakfang / js.py
Last active April 7, 2023 04:45
How to import js modules into python
import sys
import jiphy # pip install
from os import path
from types import ModuleType
class JsFinder(object):
def find_module(self, name, m_path):
name += '.js'
if m_path is not None: