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
@Bill
Bill / docker-compose.yml
Last active April 25, 2025 19:03
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!
import json, traceback, requests, types
from collections import defaultdict
try:
from urllib.parse import urlencode
except ImportError:
from urllib import urlencode
class HypothesisUtils:
@imjasonh
imjasonh / markdown.css
Last active January 3, 2025 20:15
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@morganrallen
morganrallen / _README.md
Last active January 15, 2023 19:41
Janky Browser

JankyBrowser

The only cross-platform browser that fits in a Gist!

One line install. Works on Linux, MacOSX and Windows.

Local Install

$> npm install http://gist.github.com/morganrallen/f07f59802884bcdcad4a/download
@ramsey
ramsey / freenode-channel-setup
Created September 17, 2014 19:22
Base Freenode Channel Setup
Join the channel you want to register. Make sure you're an op (either the first to join, or someone who is an op there sets you to +o).
/join #newchannel
/msg chanserv register #newchannel
/msg chanserv set #newchannel mlock +cnt-s
/msg chanserv set #newchannel guard on
/msg chanserv set #newchannel secure on
/msg chanserv set #newchannel topiclock on
/msg chanserv set #newchannel keeptopic on
/msg chanserv set #newchannel url http://example.org/
@ZER0
ZER0 / gist:10ef3b4b491c1dac3d70
Created August 7, 2014 16:25
ToggleButton with Global and Tab scope checked status
const { ToggleButton } = require('sdk/ui/button/toggle');
let globalToggle = ToggleButton({
id: 'my-global-toggle',
label: 'global function',
icon: './foo.png',
onChange: function() {
// delete the window state for the current window,
// automatically set when the user click on the button
this.state('window', null);
@jaw111
jaw111 / skos.jsonld
Created July 27, 2014 13:15
SKOS JSON-LD context
{
"@context": {
"@vocab": "http://www.w3.org/2004/02/skos/core#",
"broadMatch": { "@type": "@id" },
"broader": { "@type": "@id" },
"broaderTransitive": { "@type": "@id" },
"closeMatch": { "@type": "@id" },
"exactMatch": { "@type": "@id" },
"hasTopConcept": { "@type": "@id" },
"inScheme": { "@type": "@id" },
@magicznyleszek
magicznyleszek / jekyll-and-liquid.md
Last active January 25, 2025 20:12
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes:

(function(exports) {
'use strict';
implementRequestBookmark();
/**
* Expose requestBookmark() on navigator
* @return {void}
*/
function implementRequestBookmark(){
@wil
wil / link_header.py
Last active December 20, 2015 20:29 — forked from mnot/link_header.py
HTTP Link header parsing routines originally adapted from [Mark Nottingham's gist](https://gist.github.com/mnot/210535) This version adds a `parse_link_value_by_rel` convenience function to address a common use case.