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
EVAL "local members = redis.call('smembers',KEYS[1])\n local results = {}\n for index,key in ipairs(members) do results[index] = redis.call('hgetall',KEYS[1] .. '/' .. key) end \n return results" 1 accounts |
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
import math | |
import logging | |
import time | |
import random | |
from multiprocessing import Process | |
from redis import StrictRedis, WatchError | |
""" | |
RedisSortedSetDelayedQueue - uses zset to keep maintain a time ordered queue of items | |
""" |
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
// copy from node 0.12 source lib folder and add to your package.json | |
// | |
// "browser": { | |
// "net": "chrome-net", | |
// "http": "./http/http.js", | |
// "_http_agent": "./http/_http_agent.js", | |
// "_http_client": "./http/_http_client.js", | |
// "_http_common": "./http/_http_common.js", | |
// "_http_incoming": "./http/_http_incoming.js", |
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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: Mailvelope v1.2.2 | |
Comment: https://www.mailvelope.com | |
xsFNBFYo5qUBEACigdbnvIeCSvWnyeX2Vea10OxWkkBk06Y8KCFWTOXRGq4O | |
8U9gU3/sX4ub4Fu5wkRlplPEII0xujE0ZhRBrzSheGbS79yQsn1hGelLqV3x | |
djJjSER830FcZyELy5iCc0gqD3VJ3bORUm12zradzCpJU2px1w2yaJIuWiaE | |
Jg6GQgEu9ftJkycS8tqd9sR8GSLXbSgtbiVuB/8NGlhsob5Qz7Udf6/5uI8D | |
3G8OSk5evorVUHwc/XOfBgyq/mG4ygBNINR2f8wGMuZBOY1EEtwHwGjmoV5o | |
ABqVnszOMwfZnVAAkcekP/XqEGC+Oygw+kc8uC3jsZEETJ4IvWp1avjQk7BL |
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 python | |
import string, logging | |
from logging import StreamHandler | |
from flask import g | |
import boto | |
import StringIO | |
DEFAULT_FORMAT = "%(asctime)s %(levelname)-5s %(message)s" | |
DEFAULT_SUBJECT = "FlaskBufferingSESHandler log" |
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
import re | |
testflight_file = './testflight_devices.txt' | |
testflight_data = open(testflight_file).read() | |
apple_file = './apple_devices.txt' # copy and paste from provisioning portal | |
apple_data = open(apple_file).read() | |
apple_uuids = re.findall('[a-z0-9]{30,50}',apple_data) |
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
import logging | |
import zerigodns | |
import boto | |
from boto.route53.record import ResourceRecordSets | |
from boto.s3.website import RedirectLocation | |
# There is no API for these so we have to embed and lookup | |
# https://forums.aws.amazon.com/thread.jspa?threadID=116724 | |
# http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region |
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
<html><body><iframe sandbox="allow-forms allow-scripts allow-same-origin" | |
src="https://apps.screen.cloud/youtube/index.html?url=M7lc1UVf-VE"></iframe></body></html> |
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> | |
<html> | |
<body> | |
<div id="player"></div> | |
<script> | |
// code taken from yt iframe api example | |
var tag = document.createElement('script'); | |
tag.src = "https://www.youtube.com/iframe_api"; |
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
function onTimezoneOffsetChange(changeHandler){ | |
function getTimezoneOffset(){ | |
const d = new Date() | |
return d.getTimezoneOffset() | |
} | |
function getNextHourOffset(){ | |
const d = new Date() | |
return (1000*60*60) - (((d.getMinutes()*60) + d.getSeconds()) * 1000) + d.getMilliseconds() |
OlderNewer