Skip to content

Instantly share code, notes, and snippets.

View yoshuawuyts's full-sized avatar

Yosh yoshuawuyts

View GitHub Profile
@yoshuawuyts
yoshuawuyts / gruntfile.js
Created July 29, 2013 18:33
When deploying to nodejitsu my tests were triggered, which I found odd. After examining the output, it seems as if sails lift -prod still triggers the develop tasks. Note: replaced all cookie values in output with {{}}
'use strict';
/////////////////////////////////////////////////////////////////
//////TABLE OF CONTENT///////////////////////////////////////////
/////////////////////////////////////////////////////////////////
// 1. Variables
// 2. Load modules
// 3. Build: Dir
// 4. Build: JS
// 5. Build: Styles
@yoshuawuyts
yoshuawuyts / gist:6489529
Created September 8, 2013 23:31
nodejitsu error
error: Nodejitsu Error (500): Internal Server Error
warn: Error returned from Nodejitsu
error: Error: App failed to start after 3 attempts.
error: at AppController._startDrone.server (/root/nodejitsu/lib/nodejitsu/
resources/app/controller.js:514:25)
error: at Servers.free (/root/nodejitsu/node_modules/conservatory-api/lib/
client/servers.js:89:5)
error: at Request.onComplete [as _callback] (/root/nodejitsu/node_modules/
conservatory-api/lib/client/client.js:161:7)
error: at Request.init.self.callback (/root/nodejitsu/node_modules/conserv
@yoshuawuyts
yoshuawuyts / layout.jade
Last active December 23, 2015 05:29
HTML 5 boilerplate (H5BP) for Jade with Angular and jQuery support.
!!! 5
//if lt IE 7
<html class="no-js lt-ie9 lt-ie8 lt-ie7">
//if IE 7
<html class="no-js lt-ie9 lt-ie8">
//if IE 8
<html class="no-js lt-ie9">
//[if gt IE 8]><!
html(class='no-js')
//<![endif]

This is what a workflow should, and possibly will look like in the (very) near future:

Prerequisites
  • install node
  • install docker
  • know what's up
  • install yo
Step 1
  • yo docker
.
├── api
|   ├── module_name
|   │   ├── handler   // router, facade object
|   │   ├── action    // controller
|   │   ├── resource  // db, api interaction
|   │   ├── processor // data transformation
|   │   └── tests
│ └── routes // unifies all handlers

Jobs

Job centered testing. Pick an action, expectation and goal to combine them into a job story. Job stories aim to be used in both UX design and integration testing, leveraging a single point of comparison.

Actions [user generated, system generated]
  • When I click this specific button
  • When I visit a certain url
  • When I make a certain gesture
  • When the system fires an event
.
├── api     // works with RAPHT modules
├── build
├── client  // works with RAPHT modules
│   ├── fonts
│   ├── images
│   ├── modules
│   ├── styles
│ └── vendor
Module Description
Parser follow unit test paths, output event on each interaction node
Mapper catch events, generate node map
Renderer generate integration / acceptance tests to handle each node
@yoshuawuyts
yoshuawuyts / colors.styl
Last active January 2, 2016 10:49
basic color schemes in hsl for stylus | 8 shades of grey 8 base colors = 16 total colors which should suffice for most websites
.shade1,
.black
color: hsl(0, 0%, 7%)
.shade2
color: hsl(0, 0%, 20%)
.shade3
color: hsl(0, 0%, 33%)
.shade4
color: hsl(0, 0%, 47%)
.shade5
<html>
<head> … </head>
<body>
<script>
var b = document.documentElement;
b.setAttribute('data-useragent', navigator.userAgent);
b.setAttribute('data-platform', navigator.platform );
b.className += ((!!('ontouchstart' in window) || !!('onmsgesturechange' in window))?' touch':'');
</script>