Skip to content

Instantly share code, notes, and snippets.

@optilude
optilude / client:entry.js
Created October 26, 2015 11:00
Webpack vs. React
// Polyfill ES6 for older browsers
import 'babel/polyfill';
// Trigger globals / methods
import 'simon/client/startup';
import './routes';
2016-01-05 23:23:13,486:DEBUG:letsencrypt.cli:Root logging level set at -20
2016-01-05 23:23:13,501:INFO:letsencrypt.cli:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2016-01-05 23:23:13,517:DEBUG:letsencrypt.cli:letsencrypt version: 0.2.0.dev0
2016-01-05 23:23:13,534:DEBUG:letsencrypt.cli:Arguments: ['-vvvvv', '--debug', '--renew-by-default', '--webroot', '--webroot-path', '/webroot', '--domain', 'cloud.mydomain.net', '--domain', 'router.mydomain.net', '--domain', 'nas.mydomain.net', '--email', '[email protected]', '--agree-tos']
2016-01-05 23:23:13,549:DEBUG:letsencrypt.cli:Discovered plugins: PluginsRegistry(PluginEntryPoint#nginx,PluginEntryPoint#standalone,PluginEntryPoint#manual,PluginEntryPoint#webroot,PluginEntryPoint#apache,PluginEntryPoint#null)
2016-01-05 23:23:13,564:DEBUG:letsencrypt.cli:Requested authenticator webroot and installer None
2016-01-05 23:23:13,579:DEBUG:letsencrypt.plugins.webroot:Creating root challenges validation dir at /webroot/.well-known
@optilude
optilude / value.py
Last active January 19, 2016 22:51
def resolve_field_value(self, issue, field_name):
field_value = getattr(issue.fields, field_name)
if field_value is None:
return None
value = getattr(field_value, 'value', field_value)
if isinstance(value, (list, tuple)):
if len(value) == 0:
<div class="container header">
<div class="main">
<a id="logo" href="/">
{{#avatar}}
<img class="avatar {{#roundAvatar}}rounded{{/roundAvatar}}" src="{{avatar}}" alt="{{name}}'s avatar"/>
{{/avatar}}
{{title}}
</a>
<div class="nav">
<a href="/" title="Home">Home</a>
@optilude
optilude / weibull_estimate.py
Last active March 2, 2022 15:57
Kanban lead time weibull distribution estimator
import numpy as np
def weibull_estimate(min_, max_, shape=1.25):
"""Draw a random number between min_ and max_ using a Weibull
distribution with shape `shape`.
Thanks to Troy Magennis for the inspiration!
"""
return min(max_, ((max_ - min_) / 4.0) * np.random.weibull(shape) + min_)
↪ meteor
[[[[[ ~/Build/JavaScript/simon/app ]]]]]
=> Started proxy.
=> Started MongoDB.
=> Meteor 1.4.1.1 is available. Update this project with 'meteor update'.
Warning: unable to resolve "es2015" in presets of /Users/maraspeli/Build/JavaScript/simon/app/.babelrc
Warning: unable to resolve "transform-class-properties" in plugins of /Users/maraspeli/Build/JavaScript/simon/app/.babelrc
Warning: unable to resolve "transform-decorators-legacy" in plugins of /Users/maraspeli/Build/JavaScript/simon/app/.babelrc
Everybody's doin' a brand new dance now
(C'mon baby do the vmotion)
I know you'll get to like it
If you give it a chance now
(C'mon baby do the vmotion)
My little baby sister can do it with ease
It's easier than learning your a be see's
So come on, come on,
Do the vmotion with me
You gotta swing your hips now
@optilude
optilude / example.js
Last active January 1, 2017 23:11
Helper for JS-XLSX (https://github.com/sheetjs/js-xlsx) to read tables with named columns into a data structure that is easy to work with.
function doSomething(workbook) {
let { sheet, range } = findSheet(workbook, "Invoices");
if(sheet === null) {
return null;
}
let { columns, firstRow } = findTable(sheet, range, {
name: "Person name",
@optilude
optilude / arlobackup.py
Created September 30, 2018 20:23
Arlo backup (Python 2.7)
import sys
import os
import logging
import argparse
import datetime
from datetime import timedelta, date
from Arlo import Arlo
2019-04-28 17:17:33 DEBUG (SyncWorker_2) [pyaarlo] starting
2019-04-28 17:17:33 DEBUG (SyncWorker_2) [pyaarlo] starting request=https://arlo.netgear.com/hmsweb/login/v2
2019-04-28 17:17:34 DEBUG (EventStream) [pyaarlo] starting event loop
2019-04-28 17:17:34 DEBUG (EventStream) [pyaarlo] starting stream with no timeout
2019-04-28 17:17:34 INFO (SyncWorker_2) [pyaarlo] pyaarlo starting
2019-04-28 17:17:34 DEBUG (SyncWorker_2) [pyaarlo] starting request=https://arlo.netgear.com/hmsweb/users/devices
2019-04-28 17:17:34 DEBUG (SyncWorker_2) [pyaarlo] set:5EX184SH25B77/deviceId=5EX184SH25B77
2019-04-28 17:17:35 DEBUG (SyncWorker_2) [pyaarlo] set:5EX184SH25B77/deviceName=Back
2019-04-28 17:17:35 DEBUG (SyncWorker_2) [pyaarlo] set:5EX184SH25B77/deviceType=camera
2019-04-28 17:17:35 DEBUG (SyncWorker_2) [pyaarlo] set:5EX184SH25B77/mediaObjectCount=98