Skip to content

Instantly share code, notes, and snippets.

@dmzza
dmzza / failed-calculateDatabaseSteps-20200119002201.md
Created January 19, 2020 08:24
Error running prisma2 lift up

Failed calculateDatabaseSteps at 2020-01-19T08:22:01.460Z

RPC One-Liner

{"id":2,"jsonrpc":"2.0","method":"calculateDatabaseSteps","params":{"projectInfo":"","assumeToBeApplied":[],"stepsToApply":[{"tag":"CreateSource","source":"db"},{"tag":"CreateArgument","location":{"tag":"Source","source":"db"},"argument":"provider","value":"\"sqlite\""},{"tag":"CreateArgument","location":{"tag":"Source","source":"db"},"argument":"url","value":"\"file:dev.db\""},{"tag":"CreateModel","model":"User"},{"tag":"CreateField","model":"User","field":"id","type":"String","arity":"Required"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"User","field":"id"},"directive":"default"}},{"tag":"CreateArgument","location":{"tag":"Directive","path":{"tag":"Field","model":"User","field":"id"},"directive":"default"},"argument":"","value":"cuid()"},{"tag":"CreateDirective","location":{"path":{"tag":"Field","model":"User","field":"id"},"directive":"id"}},{"tag":"CreateField","model":"User","field":"email","type
@dmzza
dmzza / error.html
Created January 11, 2020 10:58
Photo Booth Studio Error Page
<style>
.bang {
font-weight: 800;
font-size: 300pt;
}
.bang::before {
content: "!";
}
svg {
@dmzza
dmzza / Contract Killer 3.md
Last active September 23, 2018 08:20 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@dmzza
dmzza / onboarding-outline.md
Last active May 10, 2016 22:45
Onboarding Outline and Notes

Current sign up process:

  1. phone number (or see social sign up below)
  2. confirmation code
  3. email address, mandatory for contact exchange (for now, but doesn't have to be)
  4. Missing profile information?
  • autofill:
    1. ask for contact permission
    2. either ask which contact you are or go to step 5
  • manual:
  1. goes to profile#edit where anything missing is highlighted (name is only found from the iPhone's name)
@dmzza
dmzza / upload.rb
Last active December 10, 2016 09:13 — forked from openfirmware/upload.rb
# Potential solution to "Using accepts_nested_attributes_for with a belongs_to association, and using find_or_create_by_attr behaviour"
# http://stackoverflow.com/questions/2970255/using-accepts-nested-attributes-for-with-a-belongs-to-association-and-using-find
class Upload < AR:B
belongs_to :user
belongs_to :observed_property
belongs_to :sensor
attr_accessor :observed_property_attributes,
:sensor_attributes

Keybase proof

I hereby claim:

  • I am dmzza on github.
  • I am dmzza (https://keybase.io/dmzza) on keybase.
  • I have a public key whose fingerprint is 16BA 9112 15EC 8DA2 F1E4 36A6 930C 3955 D3C7 0BB4

To claim this, I am signing this object:

@dmzza
dmzza / gist:8682397
Last active January 4, 2016 21:39
Getting to the sqlite console for the iPhone Simulator
cd ~/Library/; cd 'Application Support'; cd 'iPhone Simulator'; cd 7.1-64/Applications; ls -l;
returns this:
drwxr-xr-x@ 6 david staff 204 Jan 26 08:21 1E58656A-CF95-4EB2-B69B-2C278EA3E135
drwxr-xr-x@ 6 david staff 204 Jan 26 08:21 67742A6D-A627-4854-9901-AB44C7AB6757
drwxr-xr-x@ 6 david staff 204 Jan 26 08:21 AD33D807-54A2-4CF8-9F18-7BD976E2A5FC
drwxr-xr-x@ 6 david staff 204 Jan 26 08:21 B3880242-ADEF-480B-8114-490FFCA37401
drwxr-xr-x@ 6 david staff 204 Jan 26 08:21 CC26D5B4-3200-4C0F-97BB-8D485CB4B3A9
drwxr-xr-x@ 6 david staff 204 Jan 29 00:19 DC73DACE-6141-4D69-9CDC-9B02002F62FB
$(function() {
$("input").each(function(i) {
streets = "Myrtle Ave and Hart St";
street = streets.split(" and ");
switch(i) {
case 0:
$(this).val(203.0);
break;
case 1:
$(this).val(400);
@dmzza
dmzza / gist:5448364
Last active December 16, 2015 14:20
javascript: function iprl5() % 7Bvar d = document,
z = d.createElement('scr' + 'ipt'),
b = d.body,
l = d.location;
try % 7Bif(!b) throw (0);
d.title = '(Saving...) ' + d.title;
z.setAttribute('src', l.protocol + '//localhost:5000/listings/91.js');
b.appendChild(z); % 7Dcatch(e) % 7Balert('Please wait until the page has loaded.'); % 7D % 7Diprl5();
void(0)
@dmzza
dmzza / titleCaps.js
Created November 2, 2012 18:48 — forked from gasi/titleCaps.js
Title Caps (JavaScript)
/*
* Title Caps
*
* Ported to JavaScript By John Resig - http://ejohn.org/ - 21 May 2008
* Original by John Gruber - http://daringfireball.net/ - 10 May 2008
* License: http://www.opensource.org/licenses/mit-license.php
*/
(function(){
var small = "(a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|v[.]?|via|vs[.]?)";