Skip to content

Instantly share code, notes, and snippets.

View daviddahl's full-sized avatar
💭
burning the midnight oil

David Dahl daviddahl

💭
burning the midnight oil
View GitHub Profile
@daviddahl
daviddahl / proof.json
Created October 29, 2018 20:24
autonomica - proof
{
"handle": "daviddahl",
"ipfsId": "QmRuMAEaUQP6vNBXSCa3FQqVk48t65zA79RsdP5n1sDQg3",
"proof": {
"message": {
"statement": "I am daviddahl on github.com",
"username": "daviddahl",
"service": "github.com"
},
"timestamp": 1540844642490,
@daviddahl
daviddahl / proof.json
Created October 29, 2018 11:54
autonomic test proof
{
"handle": "daviddahl",
"ipfsId": "QmRuMAEaUQP6vNBXSCa3FQqVk48t65zA79RsdP5n1sDQg3",
"proof": {
"message": {
"statement": "I am daviddahl on github.com",
"username": "daviddahl",
"service": "github.com"
},
"timestamp": 1540813976725,
@daviddahl
daviddahl / proof.json
Created October 29, 2018 11:42
proof.json
{
"handle": "daviddahl",
"ipfsId": "QmRuMAEaUQP6vNBXSCa3FQqVk48t65zA79RsdP5n1sDQg3",
"proof": {
"message": {
"statement": "I am daviddahl on github.com",
"username": "daviddahl",
"service": "github.com"
},
"timestamp": 1540813278054,
@daviddahl
daviddahl / proof.json
Created October 28, 2018 00:14
autonomical proof
{
"handle": "daviddahl",
"ipfsId": "QmRuMAEaUQP6vNBXSCa3FQqVk48t65zA79RsdP5n1sDQg3",
"proof": {
"message": {
"statement": "I am daviddahl on github.com",
"username": "daviddahl",
"service": "github.com"
},
"timestamp": 1540685623227,
@daviddahl
daviddahl / github-proof.json
Created October 14, 2018 17:45
Autonomica Proof
{
"handle": "daviddahl",
"ipfsId": "QmRuMAEaUQP6vNBXSCa3FQqVk48t65zA79RsdP5n1sDQg3",
"proof": {
"message": {
"statement": "I am daviddahl on github.com",
"username": "daviddahl",
"service": "github.com"
},
"timestamp": 1539539023189,
@daviddahl
daviddahl / array-sort.js
Created September 28, 2017 18:00
Implement array sort using splice and for
// Using only the Array method Array#splice and the attribute Array#length, please create an array
// that is a unique sorted list given the below two lists.
var assert = require('assert');
var run_tests = function() {
var list1 = [47, 2, 14, 59, 77, 13, 33, 24, 66, 72, 31];
var list2 = [63, 95, 33, 36, 4, 30, 51, 86, 2, 56, 37];
var expected = [
CREATE OR REPLACE VIEW pds_retailer_inventory_latest_vu AS
SELECT a.id,
a.created,
a.updated,
greatest(a.created, a.updated) as last_updated,
(SELECT a.updated WHERE a.retailer_inventory_location_id = l.id ORDER BY a.updated DESC LIMIT 1) as last_inventory_run,
a.sku,
a.available_qty,
a.retailer_inventory_location_id,
l.locator_id,
@daviddahl
daviddahl / plv8-modules.sh
Last active June 22, 2017 02:52
plv8-modules
#! /bin/bash
sudo apt-get install npm
cd /var/django
npm install moment moment-timezone
sudo -u postgres psql -d template1 -c "create extension plv8;"
sudo -u postgres psql -d template1 << EOF
@daviddahl
daviddahl / css-transform-research.md
Last active May 18, 2016 20:50
CSS transform research

CSS transform research

Find, in the relevant standard(s), why the following works in Gecko:

  • elem.style.WebKitTransform

A:

It is difficult to tell from reading the spec why the browser implementations behave the way the do. Outside of the standards process, human decisions around not supporting unstandardized browser functionality and behavior drove the usage of -webkit-* and -moz-*. digging through the mailing lists will no doubt turn up the exact reasons.

For now, the techical reasons are found in code.

@daviddahl
daviddahl / calc-1.sql
Last active May 9, 2016 22:50
sample calc
case
when {{action}} like 'T_%'
then 'Processing...' -- <-- 1st test
when {{listing_location_id}} <> '{{profile.default_participant.location.id}}' -- <-- 2nd test
then 'N/A'
when {{pre_delivery_verify}} = 'Confirm' and {{action}} <> 'Received' <-- 3rd test
then 'Assured'
when {{actor}} = 'Seller' <-- 4th test
then
case