Skip to content

Instantly share code, notes, and snippets.

View netj's full-sized avatar

Jaeho Shin netj

View GitHub Profile
netj /
Last active August 11, 2021 23:11 — forked from quickbreach/
Convert mysqldump to JSON, optional upload to elastic
import re
import csv
import json
import sys
import requests
from requests.auth import HTTPBasicAuth
import hashlib
Usage: 'python3 <targetFile.sql>
netj / scrollSelectionIntoView.js
Last active September 14, 2016 19:59 — forked from alisey/scrollSelectionIntoView.js
Scroll selection into view
// Scroll to selection focus, but only if it's out of view. Align selection
// focus with the top or bottom edge of its scroll-container. Return true
// on success.
// * there might be several nested scroll-containers, including window
// * must not try to scroll overflow:hidden and overflow:visible elements
// * no scrolling should happen if selection focus is visible
// * selection is not necessarily collapsed
// * range.getBoundingClientRect doesn't work for collapsed ranges
// * Opera reports incorrect startOffset and endOffset for collapsed ranges
// outside of text nodes (e.g. between 2 <br> elements), range.insertNode
netj /
Created February 25, 2016 13:43 — forked from deepdiveDeployBot/
DeepDive GitHub release assets metadata

This Gist archives metadata for replaced DeepDive release assets, from which we can sum download counts, etc.