Replaced by https://github.com/Jonhoo/seriex
🤦♂️
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
module.exports = (function(){ | |
const MS = | |
{ seconds: 1000 | |
, minutes: 60 * 1000 | |
, hours: 60 * 60 * 1000 | |
, days: 24 * 60 * 60 * 1000 | |
, weeks: 7 * 24 * 60 * 60 * 1000 | |
, months: 30 * 7 * 24 * 60 * 60 * 1000 | |
, years: 365 * 24 * 60 * 60 * 1000 } |
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
<?php | |
//DOM Templating classes v7 © copyright (cc-by) Kroc Camen 2012 | |
//you may do whatever you want with this code as long as you give credit | |
//documentation at http://camendesign.com/dom_templating | |
class DOMTemplate extends DOMTemplateNode { | |
private $DOMDocument; | |
private $keep_prolog = false; | |
These scripts will find all git repositories on the local machine, find all commits made by some user (specified as arguments to find-commits
), and plot the number of commits, lines added, and lines removed over time. Commits that add or remove over 10000 lines will be ignored (for huge data files and such).
To run:
$ ./find-commits.sh jon@thesquareplanet.com jon@tsp.io > commits.txt
$ cat commits.txt | ./draw-commits.sh
When passing Go slices through interface{}
values, beware that this slows your application down. If possible, you should instead be passing around pointers to slices, and dereference them after the cast:
$ go test -c
$ ./x.test -test.bench . -test.run Benchmark -test.benchtime 3s
BenchmarkInterfaceSlice 30000000 148 ns/op
BenchmarkInterfaceSlicePtr 300000000 14.0 ns/op
$ go tool pprof -text -cum x.test slice.out | grep -vE 'testing|goexit|Benchmark'
4420ms of 4610ms total (95.88%)
Dropped 16 nodes (cum <= 23.05ms)
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 | |
# | |
# Script for running `go test` a bunch of times, in parallel, storing the test | |
# output as you go, and showing a nice status output telling you how you're | |
# doing. | |
# | |
# Normally, you should be able to execute this script with | |
# | |
# ./go-test-many.sh | |
# |
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 code demonstrates a data flow-like programming pattern, in which each | |
//! vertex of a DAG is associated with a long-running thead. The vertices | |
//! forward information along the edges, and the leaves just print out any data | |
//! they see. In this example, the vertices perform no computation, whereas | |
//! normally they would. | |
use std::thread; | |
use std::sync; | |
use std::sync::mpsc; | |
use std::collections::HashMap; |
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
# PKGBUILD for lua52-lgi | |
# Maintainer: NONE | |
# lua-lgi Maintainer: speps <speps at aur dot archlinux dot org> | |
# lua-lgi Maintainer: Sébastien Luttringer | |
_pkgbase=lgi | |
pkgname=lua52-lgi | |
pkgver=0.9.1 | |
pkgrel=1 | |
pkgdesc='Lua 5.2 bindings for gnome/gobject using gobject-introspection library' |
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
.message-group .comment .markup, .chat { | |
color: inherit; | |
} | |
.message-group.compact .message .timestamp { | |
color: #555; | |
float: right; | |
} | |
.reaction .reaction-count { | |
color: inherit; |
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/awk -f | |
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff | |
# My copy here is written in awk instead of C, has no compelling benefit. | |
# Public domain. @thingskatedid | |
# Run as awk -v x=xyz ... or env variables for stuff? | |
# Assumptions: the data is evenly spaced along the x-axis | |
# TODO: moving average |
OlderNewer