Skip to content

Instantly share code, notes, and snippets.

View BigBlueHat's full-sized avatar
🎩
building Web things

BigBlueHat BigBlueHat

🎩
building Web things
View GitHub Profile
@boina-n
boina-n / InfoBloxToBind.sh
Created October 22, 2017 15:56
Convert Infoblox zones to Bind Zones
#!/bin/bash
echo "#############################################################"
echo "#############################################################"
echo "## Infoblox to bind export script ##"
echo "## This script should be run on ##"
echo "## a server allowed transfer the zones ##"
echo "## the zones by transfer ##"
echo "#############################################################"
echo "#############################################################"
@faried
faried / maildirtocouch.py
Created February 1, 2011 22:02
Store messages in a Maildir into a couchdb database.
#!/usr/bin/env python
"""Store messages in a Maildir into a couchdb database."""
import couchdb
from mailbox import Maildir
from optparse import OptionParser
import os
from pprint import pprint
import sys
from uuid import uuid4
@wickman
wickman / README.md
Created April 12, 2012 22:55
Python development in Pants (tutorial)

Python development using Pants

brian wickman - @wickman

[TOC]

Why use Pants for Python development?

Pants makes the manipulation and distribution of hermetically sealed Python environments

@Bill
Bill / docker-compose.yml
Last active July 8, 2022 07:10
Run a local Hypothes.is annotation server (and the services it needs) via docker-compose
# This docker-compose.yml will run the Hypothes.is annotation server.
# (adapted from instructions here https://h.readthedocs.org/en/latest/INSTALL.html)
#
# Place this file in the working directory (clone of https://github.com/hypothesis/h)
# run with docker-compose up -d
#
# Now browse to Hypothes.is at http://192.168.59.103:8000/ and create an account
# You'll see the invitation email in Mailcatcher at http://192.168.59.103:1080/
# Click that invitation link and log in on your local Hypothes.is
# And you are ready to annotate!
@mnot
mnot / link_header.py
Created October 15, 2009 00:41
link_header.py: HTTP Link header parsing
@Gozala
Gozala / Readme.md
Last active January 12, 2021 13:52
Range hilighting code by wrapping text nodes of the range & replacing images.

Highlight Selection Ranges

Code here takes a DOM Selection Range instance and starts traversing a DOM starting from startContainer up to endContainer and wraps Text elements with elements that have semi-transparent background & swaps img elements with clones that are styled to have semi-transparent yellow overlay.

Issues

  • Only handles selecting text and images & would not cover divs with backgrounds for instance.
@melanke
melanke / README.md
Created January 17, 2012 17:32 — forked from eligrey/object-watch.js
watch the changes of some object or attribute
@dlongley
dlongley / transform.js
Created November 15, 2019 16:23
Convert native types
const jsonld = require('jsonld');
const input = {
"@context": {
"@vocab": "http://vocab.example/"
},
"age": {
"@value": "27",
"@type": "http://www.w3.org/2001/XMLSchema#integer"
}
@melanke
melanke / MultiGetSet.js
Created June 19, 2012 20:53
MultiGetSet.JS - Quickly generate getters and setters for multiple attributes
var MultiGetSet = function(opt){
var getType = function(o) {
return ({}).toString.call(o).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
};
if(!opt.public || !opt.private)
return opt.public;
if(opt.handler && opt.handler.init)
@rnewson
rnewson / gist:2387973
Created April 14, 2012 21:31
CouchDB Future Feature List - Round 2
A list of features that we want to see in CouchDB. Needs to be voted on so that it can become a priority queue.
User Facing Features
====================
1. Conflicts are the rule, not the exception
All previous versions of CouchDB hide conflicts by default (selecting
an arbitrary but consistent winning revision). Expert users can find
and resolve conflicts.