I hereby claim:
- I am fritzy on github.
- I am fritzy (https://keybase.io/fritzy) on keybase.
- I have a public key ASCnN0TAG8SqzlRfVWz9_usucplgGZjT_Nxuf0lzAMzcWAo
To claim this, I am signing this object:
const RSA = { name: 'RSASSA-PKCS1-v1_5' }; | |
const testValue = 'I am the very model of a modern major general.'; | |
const testValue2 = 'I am the very model of a modern majr general.'; | |
//if browser, uses window.crypto, if node wraps openssl | |
const WebCrypto = require('node-webcrypto-ossl'); | |
const crypto = new WebCrypto(); | |
(async () => { | |
console.log('generating key'); |
I hereby claim:
To claim this, I am signing this object:
CREATE EXTENSION IF NOT EXISTS "pgcrypto"; | |
-- Create a trigger function that takes no arguments. | |
-- Trigger functions automatically have OLD, NEW records | |
-- and TG_TABLE_NAME as well as others. | |
CREATE OR REPLACE FUNCTION unique_short_id() | |
RETURNS TRIGGER AS $$ | |
-- Declare the variables we'll be using. | |
DECLARE |
--EVAL "this script" 1 key userid password | |
local key = KEYS[1]; | |
local userid, pass = unpack(ARGV); | |
local hash = redis.sha1hex('SOME-STATIC-SALT'..string.sub(pass, 1, 2)..userid..string.sub(pass, 3)); | |
--no error, does hash match? | |
return {false, (redis.call('GET', key) == hash)} |
--EVAL "this script" 2 key lookup jsonvalue attribute | |
local key, lookup = unpack(KEYS); | |
local jsonvalue, attribute = unpack(ARGV); | |
local value = cjson.decode(jsonvalue); | |
local oldvalue = redis.call('GET', key); | |
--if this key was set before, remove the old lookup | |
if type(oldvalue) == 'string' then | |
oldvalue = cjson.decode(oldvalue); |
--2 key changelog update millisecond-epoch | |
local key, changelog = unpack(KEYS); | |
local update, epoch = unpack(ARGV); | |
local result = redis.call('SET', key, update); | |
local notice = cjson.encode({key = key, value = update, time = epoch}); | |
redis.call('ZADD', changelog, epoch, notice); | |
redis.call('ZREMRANGEBYSCORE', changelog, '-inf', epoch - 86400000); |
--EVAL "this script" 1 key_name new_item max_size | |
local key = KEYS[1]; | |
local item, max = unpack(ARGV); | |
redis.call('RPUSH', key, item); | |
redis.call('LTRIM', key, -max, -1); |
--EVAL "this script" 1 some-hash-key | |
local key = KEYS[1]; | |
local keyvalues = redis.call('HGETALL', key); | |
local result = {}; | |
--every other value is a key | |
for idx = 1, #keyvalues, 2 do | |
result[keyvalues[idx]] = keyvalues[idx + 1] | |
end |
Upgrade to Linux 4.8
apt-cache search linux | grep 4.8
apt-get install linux-image-4.8xxxxx linux-extras-4.8xxxx linux-headers-4.8.x-xxxx
I used 4.8.0-30-generic flavors of all of those.
linux-image-4.8.0-30-generic - Linux kernel image for version 4.8.0 on 64 bit x86 SMP
#!/usr/bin/env node | |
// ./generatelookup -l lookupkey -p somekey* -a attribute | |
var redis = require('redis').createClient(); | |
var async = require('async'); | |
var opt = require('optimist'); | |
opt.usage('$0 -l lookup -p pattern -a attribute'); | |
opt.demand(['l', 'p', 'a']); | |
var argv = opt.argv; | |
var iter = '0'; |