Let's see where are the G360 customers?
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 bash | |
VERSION=4.0.1 | |
SCRIPT=`basename "$0"` | |
APPNAME="My App" | |
APPICONS="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericApplicationIcon.icns" | |
OSX_VERSION=`sw_vers -productVersion` | |
PWD=`pwd` | |
function usage { |
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
-- inspired by: http://www.esp8266-projects.com/2015/03/buttons-pushbuttons-and-debouncing-story.html | |
local GPIO14 = 5 | |
local debounceDelay = <however-many-ms-your-sensor-requires> | |
local debounceAlarmId = <0-6> | |
gpio.mode(GPIO14, gpio.INT, gpio.PULLUP) | |
gpio.trig(GPIO14, "down", doorLocked) | |
function doorLocked() | |
-- don't react to any interupts from now on and wait 50ms until the interrupt for the up event is enabled | |
-- within that 50ms the switch may bounce to its heart's content |
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
-- inspired by https://github.com/hackhitchin/esp8266-co-uk/blob/master/tutorials/introduction-to-gpio-api.md | |
-- and http://www.esp8266.com/viewtopic.php?f=24&t=4833&start=5#p29127 | |
local pin = 4 --> GPIO2 | |
function debounce (func) | |
local last = 0 | |
local delay = 50000 -- 50ms * 1000 as tmr.now() has μs resolution | |
return function (...) | |
local now = tmr.now() |
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 echoHttp (hook) { | |
console.log("Console messages are sent to /logs"); | |
console.log(hook.params); | |
console.log(hook.req.path); | |
console.log(hook.req.method); | |
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
package main | |
// @lizrice, mostly copied from @doctor_julz: https://gist.github.com/julz/c0017fa7a40de0543001 | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"syscall" | |
) |
Let's see where are the buyers of g360!
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 | |
main() { | |
eval "$(docopts -V - -h - : "$@" <<EOF | |
Usage: tool [options] | |
--page=<page> Page numbers [default: 10] | |
--user=<user> Username | |
--password=<pwd> Password |
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> | |
<script src="http://mbostock.github.com/d3/d3.v2.js?2.8.1"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<style> | |
body { | |
font: 10px sans-serif; | |
} | |
rect { |
This chart shows a histogram of a Bates distribution. The data is randomly generated. The values are then binned at regular intervals using D3’s histogram layout. The x-axis uses a linear scale, such that the tick values appear between bars; this provides better indication that each bar represents the count of values between its surrounding tick values.
See also this histogram of a log-normal distribution of time durations.
NewerOlder