Skip to content

Instantly share code, notes, and snippets.

karl@dispater:~/Documents/repo/futel-usage-viz$ npm run preprocess
> futel-usage-viz@1.0.0 preprocess /home/karl/Documents/repo/futel-usage-viz
> node src/data-prep.js -i metrics.tgz -o static/data/
/home/karl/Documents/repo/futel-usage-viz/src/data-prep.js:6
import minimist from 'minimist';
^^^^^^^^
SyntaxError: Unexpected identifier
karl@dispater:~/Documents/repo/futel-usage-viz$ npm run preprocess
> futel-usage-viz@1.0.0 preprocess /home/karl/Documents/repo/futel-usage-viz
> node --experimental-json-modules src/data-prep.js -i metrics.tgz -o static/data/
node: bad option: --experimental-json-modules
npm ERR! code ELIFECYCLE
npm ERR! errno 9
npm ERR! futel-usage-viz@1.0.0 preprocess: `node --experimental-json-modules src/data-prep.js -i metrics.tgz -o static/data/`
npm ERR! Exit status 9
import sequence
class Agi:
def Background(self, string): print(string)
def SendDTMF(self, string): print(string)
def wait_for_digit(self, timeout): return input("Enter key:")
agi_o = Agi()
#sequence.play_sequence_prefix(agi_o, ["1","2","3","4","5","6"], 3)
#!/bin/sh -x
# XXX script should fail if any command does
# duplicity restore --file-to-restore [folder name from backup] b2://[keyID]:[application key]@[B2 bucket name] [restore path]
# folder examples: mhap, /
BUCKET=$1
LOCAL_DIR=$2
#!/usr/bin/python
"""
"""
import eventlistenerconf
import time
import logging
import sys
#import json

Keybase proof

I hereby claim:

  • I am kra on github.
  • I am kra (https://keybase.io/kra) on keybase.
  • I have a public key whose fingerprint is 9DB6 D572 062F DC2E 3952 EC76 13AA 22DA 612A 365E

To claim this, I am signing this object:

@kra
kra / gist:1179537
Created August 29, 2011 22:06
Untrusted certificates and Selenium 2 in Python
"""
Dev sites often don't have proper certificates - right now, I'm working with
expired certs with incorrect hostnames. Workarounds for using Selenium with
certs can be hard to find, especially for the Python webdriver (Selenium 2)
bindings, which have gone though many changes recently.
One way around this is to create a browser profile, but this has its own
hassles, especially if you want your test suite to work on a build box and the
box of any dev who wants to check it out and run it.
#!/usr/bin/env python
"""
Environment helper for cram.
Proof of concept, would be better implemented inside cram.py,
where we wouldn't have to write a tempfile; in that case, would probably want
to specify a prefix so we could refer to history.
Example usage:
Normal usage - the output is not regexped for clarity, but pin and txid