Skip to content

Instantly share code, notes, and snippets.

View fleveillee's full-sized avatar
:octocat:
Reticulating splines

Frédéric Léveillée fleveillee

:octocat:
Reticulating splines
  • Frédéric Léveillée inc.
  • Montreal, QC, Canada
  • 11:35 (UTC -05:00)
View GitHub Profile
@miguelmota
miguelmota / pino_trace_caller.js
Created November 26, 2019 02:05
Node.js pino logger show caller filename and line number
import path from 'path'
import pino from 'pino'
const STACKTRACE_OFFSET = 2
const LINE_OFFSET = 7
const { symbols : { asJsonSym} } = pino
function traceCaller (pinoInstance) {
const get = (target, name) => name === asJsonSym ? asJson : target[name]
@knownasilya
knownasilya / index.html
Last active November 6, 2023 18:45 — forked from Hagith/drawing-tools.html
Google Maps Advanced Drawing
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="UTF-8">
<title>Drawing Tools</title>
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false&libraries=drawing"></script>
<style type="text/css">
#map, html, body {
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@knu
knu / gist:111055
Created May 13, 2009 14:38
How to mass-rename tags and push them with Git
# Rename tags named foo-bar-#.#.# to v#.#.# and push the tag changes
git tag -l | while read t; do n="v${t##*-}"; git tag $n $t; git push --tags ; git tag -d $t; git push origin :refs/tags/$t ; done