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 / page-reloading-diagnosis.md
Last active April 22, 2016 16:00
Page reloading Diagnosis

Page Reloading Diagnosis

Examination

  • Watched the console for clues, but found the console constantly re-loading and nearly useless
  • First gut feeling this has something to do with window.location
  • Grabbed all uglified JS files and beuatified them
  • Searched each file for location
@daviddahl
daviddahl / sliding-menu-diagnosis.md
Last active April 24, 2016 04:11
Sliding Menu Diagnosis

Sliding Menu Diagnosis

Examination

  • Watched the console for clues, none forthcoming
  • Examined the CSS and click event handler for obvious coding issues, initially looks good
  • Tinkered with the css a bit based on some related issues found in stackoverflow having to do with display:block in LI and A nodes - was a red herring
  • Created a simpler test case, see: https://gist.github.com/daviddahl/a6740c9310d15452b28fac79cbc93b6a
@daviddahl
daviddahl / simplified-test-case-slider.html
Created April 22, 2016 13:16
SImlified Test Case, slider
<html>
<head>
<style>
.slide{
-webkit-transition:all .2s linear;
-webkit-transform: translate3d(0,0,0);
-moz-transition:all .2s linear;
-moz-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
}
@daviddahl
daviddahl / configuration.js
Created April 9, 2016 20:10
configuration.js
function () {
/*
* Write Configuration Properties Here:
*/
var PROTO = 'https://';
var HOST = 'dev.nulltxt.se';
var PORT = null;
var API_PATH = 'api/v1/';
begin;
create table item (
item_id int8 not null primary key default nextval('version_identifier'),
account_id int8 not null references account,
name_hmac bytea not null unique,
creation_time timestamp not null default current_timestamp,
modified_time timestamp not null default current_timestamp,
deletion_time timestamp,
value bytea,
@daviddahl
daviddahl / scema.diff
Created November 11, 2015 19:11
Diff from HEAD to the current production database
diff --git a/928a5500234abb5db508ba07b1d2f6c385fe8d19:server/lib/stores/postgres/sql/setup.sql b/HEAD:server/lib/stores/postgres/sql/setup.sql
index ed69e77..1091725 100644
--- a/928a5500234abb5db508ba07b1d2f6c385fe8d19:server/lib/stores/postgres/sql/setup.sql
+++ b/HEAD:server/lib/stores/postgres/sql/setup.sql
@@ -620,4 +620,165 @@ create unique index transaction_delete_message_msg_id_idx
on transaction_delete_message
(transaction_id, message_id);
+
+create table item (
@daviddahl
daviddahl / Kloak QA Plan 1
Last active October 14, 2015 19:02
A plan for anyone testing Kloak to follow, Private Beta (Copy this Gist to begin)
Name:
Date/Time:
Kloak Version:
1. Install Kloak from Apple Test Flight
* Bugs, Problems:
---
// Difference between Container Encryption and Item Encryption
// (Short answer: Item Encryption & decryption is identical to container encryoption and decryoption, just 1 step & simpler with no diffs, etc)
// Containers Encryption:
// https://github.com/SpiderOak/crypton/blob/a7e6a76f0c099ef2762c27f85f474bfb1c62727b/client/src/session.js#L663-L699
var selfPeer = new crypton.Peer({
session: this,
pubKey: this.account.pubKey,
signKeyPub: this.account.signKeyPub
@daviddahl
daviddahl / items-api.js
Last active August 29, 2015 14:17
Crypton Items API
// We use session.getOrCreateItem in order to create a new item that we can share with others
app.session.getOrCreateItem('myReport', function (err, report) {
if (err) {
callback(err);
return console.error(err);
}
// update the report
report.value = { updated: Date.now(), reportContent: app.reportContent };
// share this data:
CREATE OR REPLACE FUNCTION notifyUpdatedItem() RETURNS TRIGGER AS $$
DECLARE
notify_row RECORD;
BEGIN
FOR notify_row IN
SELECT s.item_session_key_share_id,
s.account_id, s.to_account_id, k.item_id,
a.username as toUser, b.username AS fromUser
FROM item_session_key_share s
JOIN item_session_key k ON