Skip to content

Instantly share code, notes, and snippets.

@kevinoid
kevinoid / session-manager-to-bookmarks.py
Created December 23, 2016 04:20
Script to convert Firefox Session Manager sessions to bookmarks.html
#!/usr/bin/env python3
"""Convert Firefox Session Manager sessions to bookmarks.html."""
import argparse
import json
import logging
import os
import sys
__version__ = '0.1.0'
@kevinoid
kevinoid / benchmark-defer-timeout-error.js
Created March 3, 2016 21:33
An example of how to add timeouts and recover from errors in deferred benchmarks with Benchmark.js.
/**
* An example of how to add timeouts and recover from errors in deferred
* benchmarks with Benchmark.js.
*
* @see https://github.com/bestiejs/benchmark.js/issues/123
* @copyright Copyright 2016 Kevin Locke <kevin@kevinlocke.name>
* @license MIT
*/
'use strict';
@kevinoid
kevinoid / google-font-dl.py
Last active March 18, 2024 23:49
Downloader for Google Web Fonts
#!/usr/bin/env python3
#
# Downloader for Google Web Fonts
#
# For usage information run with "--help"
#
# Works on Python 2.6 and later, 3 and later
# Requires tinycss (and argparse for Python 2.6) from pip
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
@kevinoid
kevinoid / LICENSE.txt
Created October 3, 2012 20:31
An example program using AsyncHttpClient with SSL certificate verification
CC0 1.0 Universal
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator and
subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for the
@kevinoid
kevinoid / .gitignore
Created October 3, 2012 19:23
An example program using Dispatch with SSL certificate verification
# Git ignore file
project/target/
target/
@kevinoid
kevinoid / windowTimers.js
Created July 19, 2012 20:05
An implementation of setInterval/setTimeout for Rhino and SpiderMonkey
/* Implementation of HTML Timers (setInterval/setTimeout) based on sleep.
*
* This file is provided under the following terms (MIT License):
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@kevinoid
kevinoid / content-with-post.rb
Created July 17, 2012 20:16
Simple Jekyll plugin to copy content with post
module Jekyll
class StaticPostFile < StaticFile
# Initialize a new StaticPostFile.
#
# site - The Site.
# base - The String path to the <source>.
# sdir - The String path of the source directory of the file (rel <source>).
# name - The String filename of the file.
# ddir - The String path of the destination directory of the file.