This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Demonstration that bulk insertsin Node.js sqlite3 using prepared statements is very slow. | |
// Usage: run with one command line argument, one of "db", "reuse", "finalize" | |
// Details: http://nelsonslog.wordpress.com/2014/11/16/node-js-sqlite3-very-slow-bulk-inserts/ | |
var sqlite3 = require('sqlite3').verbose(); | |
var start = Date.now(); | |
var db = new sqlite3.Database('inserttest.sqlite'); | |
var mode = process.argv[2], runs = "100"; | |
db.serialize(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
fn="$1" | |
of=${fn%.*}.jpg | |
lf=`ffprobe -show_streams "$fn" 2> /dev/null | awk -F= '/^nb_frames/ { print $2-1 }'` | |
rm -f "$of" | |
ffmpeg -i "$fn" -vf "select='eq(n,$lf)'" -vframes 1 "$of" 2> /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<title>Cantor pairing function</title> | |
<style> | |
td { min-width: 2em; text-align: right; } | |
</style> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3.6 | |
""" | |
Hacky code to walk all the IndexedDB storage in your Firefox profile | |
and print some basic information about them. | |
The hardcoded path here works in WSL, Linux-for-Windows. Change as needed. | |
""" | |
base_dir = '/mnt/c/Users/*/AppData/Roaming/Mozilla/Firefox/Profiles/*/storage/default/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; AutoHotkey script to make CapsLock open URLs and search Google with Clipboard contents. | |
; By Nelson Minar <nelson@monkey.org> Inspired by code at http://www.autohotkey.com/forum/topic14656.html | |
CapsLock:: | |
url := RegExReplace(Clipboard, "^\s+|\s+$") ; Trim whitespace | |
if RegExMatch(url, "^(http|ftp|telnet)") { | |
; Do nothing if it already looks like a URL | |
} else { | |
; Escape the query string. Could escape more, but this seems sufficient for Chrome | |
StringReplace, url, url, `%, `%25, All |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Mocha Tests</title> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/mocha/5.0.0/mocha.css" rel="stylesheet" /> | |
</head> | |
<body> | |
<div id="mocha"></div> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/mocha/5.0.0/mocha.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<opml version="1.0" xmlns:fz="urn:forumzilla:"> | |
<head> | |
<title>Metafilter user blogs https://metatalk.metafilter.com/24654/Who-Are-The-Bloggers-of-Metafilter</title> | |
<dateCreated>Sat, 20 Jan 2018 21:49:01 GMT</dateCreated> | |
</head> | |
<body> | |
<outline type="rss" title="Amor Bellator" text="Amor Bellator" version="RSS" xmlUrl="https://amorbellator.com/feed/" htmlUrl="https://amorbellator.com"/> | |
<outline type="rss" title="Boxer Indemnity Scholars" text="Boxer Indemnity Scholars" version="RSS" xmlUrl="https://boxerindemnityscholars.wordpress.com/feed/" htmlUrl="https://boxerindemnityscholars.wordpress.com"/> | |
<outline type="rss" title="Best Results Organizing" text="Best Results Organizing" version="RSS" xmlUrl="http://juliebestry.com/feed/" htmlUrl="http://juliebestry.com"/> | |
<outline type="rss" title="mike.whybark.com" text="mike.whybark.com" version="RSS" xmlUrl="http://mike.whybark.com/feed" htmlUrl="http://mike.whybark.com"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is the core Javascript code for http://windhistory.com/ | |
// I haven't done a full open source release, but I figured I'd put the most important | |
// D3 code out there for people to learn from. --nelson@monkey.org | |
/** Common wind rose code **/ | |
// Function to draw a single arc for the wind rose | |
// Input: Drawing options object containing | |
// width: degrees of width to draw (ie 5 or 15) | |
// from: integer, inner radius |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.