Skip to content

Instantly share code, notes, and snippets.

Avatar

Ram Srinivasan RamRS

View GitHub Profile
@alandunning
alandunning / .block
Last active Dec 28, 2018
Line Chart with Circle Tooltip D3 V4
View .block
license: gpl-3.0
@d3noob
d3noob / .block
Last active Nov 29, 2019
Favorite tooltip (simple version)
View .block
license: mit
@elmotec
elmotec / bootstrap_cmdline.py
Last active Dec 1, 2021
Minimal python program with logging and argparse.
View bootstrap_cmdline.py
#!python
"""See main.__doc__"""
import os
import logging
import glob
import unittest
import sys
@zerolab
zerolab / gist:1633661
Created Jan 18, 2012
Convert smart quotes with regular ones (and vice-versa)
View gist:1633661
<?php
//Quotes: Replace smart double quotes with straight double quotes.
//ANSI version for use with 8-bit regex engines and the Windows code page 1252.
preg_replace('[\x84\x93\x94]', '"', $text);
//Quotes: Replace smart double quotes with straight double quotes.
//Unicode version for use with Unicode regex engines.
preg_replace('[\u201C\u201D\u201E\u201F\u2033\u2036]', '"', $text);