redis command line interface like redis-cli support ssl and cluster mode
dependence: python3.6+, redis, prompt_toolkit
pip install redis
pip install prompt_toolkit==1.0.15
/* | |
I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace | |
so it's better encapsulated. Now you can have multiple random number generators | |
and they won't stomp all over eachother's state. | |
If you want to use this as a substitute for Math.random(), use the random() | |
method like so: | |
var m = new MersenneTwister(); |
var k = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 30, 40, 50, 60, 70, 80, 90, 100, 1000]; | |
var w = ['One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten', 'Eleven', 'Twelve', 'Thirteen', 'Fourteen', 'Fifteen', 'Sixteen', 'Seventeen', 'Eighteen', 'Nineteen', 'Twenty', 'Thirty', 'Forty', 'Fifty', 'Sixty', 'Seventy', 'Eighty', 'Ninety', 'Hundred', 'Thousand']; | |
var wl = {}; | |
var i, j, k, o; | |
for (i = 0; i < w.length; i++) { | |
wl[k[i].toString()] = w[i]; | |
} | |
var mx = 1000; |
let eventEmitter = require("events").EventEmitter; | |
class EvHandler extends eventEmitter { | |
constructor(process) { | |
super(); | |
let listener = this.onMessage.bind(this); | |
process.on("message", listener); | |
let clear = () => { | |
this.cbs = null; | |
this.removeAllListeners(); |
var SHAKE_THRESHOLD = 800; | |
var last_update = 0; | |
var x = y = z = last_x = last_y = last_z = 0; | |
if (window.DeviceMotionEvent) { | |
window.addEventListener('devicemotion', deviceMotionHandler, false); | |
} else { | |
alert('本设备不支持devicemotion事件'); | |
} |
public abstract class EnumClassUtils<TClass> | |
where TClass : class | |
{ | |
public static TEnum Parse<TEnum>(string value) | |
where TEnum : struct, TClass | |
{ | |
return (TEnum) Enum.Parse(typeof(TEnum), value); | |
} |
window.execEx = function(fn, maxTime) { | |
return new Promise(function (resolve, reject) { | |
var timer = setTimeout(function () { | |
if(timer) { | |
timer = false; | |
console.log('reject'); | |
reject(); | |
} | |
}, maxTime); | |
var f = function() { |
#!/usr/local/bin/node | |
const { execSync, exec, spawn, spawnSync } = require('child_process'); | |
const { writeFileSync, unlinkSync } = require('fs'); | |
process.on('uncaughtException', e => LogError(e)); | |
const config = `/tmp/stunnel-${Date.now()}${Math.random()}.conf`; | |
const port = parseInt(Math.random() * 20000) + 30000; | |
let stunnel = null; | |
const quiet = process.argv.indexOf("---Q") >= 0; | |
const debug = !quiet && process.argv.indexOf("---D") >= 0; |
#!/usr/local/bin/node | |
let { execSync } = require('child_process') | |
let args = process.argv.slice(2) | |
let host = '' | |
let port = '' | |
let format = 'split' | |
for (let i = 0; i < args.length; i++) { |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Microsoft.Xna.Framework; | |
using Microsoft.Xna.Framework.Graphics; | |
using SharpFont; | |
namespace MonoFont | |
{ |