Download OsmAndMapCreator and extract.
Install osmupdate
and osmconvert
into path.
cd ~/bin
wget -O - http://m.m.i24.cc/osmupdate.c | cc -x c - -o osmupdate
wget -O - http://m.m.i24.cc/osmconvert.c | cc -x c - -lz -O3 -o osmconvert
Download OsmAndMapCreator and extract.
Install osmupdate
and osmconvert
into path.
cd ~/bin
wget -O - http://m.m.i24.cc/osmupdate.c | cc -x c - -o osmupdate
wget -O - http://m.m.i24.cc/osmconvert.c | cc -x c - -lz -O3 -o osmconvert
Trace of ID 1 | |
1497340609369: Received request. ID: 1 | |
1497340609369: Step 1 1 | |
1497340610599: Step 2 1 | |
1497340610602: Response sent 1 | |
----- | |
Trace of ID 2 | |
1497340606575: Received request. ID: 2 | |
1497340606575: Step 1 2 | |
1497340612700: Step 2 2 |
// ==UserScript== | |
// @name Webpages slideshow | |
// @namespace https://github.com/aleung/ | |
// @version 1.1.0 | |
// @description Loop display a serial of webpages. Display time for each page can be set. | |
// @author Leo Liang | |
// @license MIT License | |
// @include * | |
// @noframes | |
// @require https://openuserjs.org/src/libs/sizzle/GM_config.js |
/************************************** | |
* Header Counters in TOC | |
**************************************/ | |
/* No link underlines in TOC */ | |
.md-toc-inner { | |
text-decoration: none; | |
} | |
.md-toc-content { |
# size of immediate sub-folders | |
du -d1 -BM | sort -g |
#!/usr/bin/env node | |
"use strict"; | |
const fs = require('fs'); | |
const readline = require('readline'); | |
const logLineRegexp = /\s+(.+?)\[(.+?)\](.*)/; | |
function processFile(file, host) { |
var _ = require('lodash'); | |
var os = require('os'); | |
function getIpAddr(nicName) { | |
let ifaces = os.networkInterfaces(); | |
let iface = _.find(ifaces[nicName], iface => { return iface.family === 'IPv4' }); | |
return _.result(iface, 'address'); | |
} | |
module.exports = _.memoize(getIpAddr); |
public interface ActiveCountMetric { | |
void inc(); | |
void dec(); | |
} |
package leoliang.common; | |
import com.google.common.base.Preconditions; | |
/** | |
* Usage example: Run 15 times in every 250ms, begins at 5 seconds later. | |
* | |
* <pre> | |
Scheduler.every(250, Scheduler.TimeUnit.MILLISECOND) | |
.beginsAt(System.currentTimeMillis() + 5000) |
#!/bin/env ruby | |
# --- Configuration --------------------------------- | |
$age_days = 3 | |
# The repository to be cleaned. | |
$repo = 'repo-name' | |
$user = 'repo-admin' |