Skip to content

Instantly share code, notes, and snippets.

@nordfjord
nordfjord / workflow.md
Created March 3, 2016 08:54
Git workflow comparison

GitHub flow

  • Anything on master is deployable
  • To work on something new, create a descriptively named branch off of master (i.e. stream-item-margins)
  • Commit to that branch locally and regularly push your work to the same named branch on the server
  • When you need feedback or help, or you think the branch is ready for merging, open a pull request
  • After someone else has reviewed and signed off on the feature, you can merge it into master
  • Once it is merged and pushed to ‘master’ on the origin, you can and should deploy immediately

All to master

@nordfjord
nordfjord / comment-model.js
Last active November 9, 2015 18:58 — forked from gilbert/comment-model.js
Mithril-friendly Model Layer
var Comment = {}
Comment.store = Store('Comment', {idprop: 'id'});
Comment.fetchForPost = function (postId) {
return m.request({ method: 'GET', url: '/api/post/' + postId + '/comments' })
.then(Comment.store.syncAll)
}
@nordfjord
nordfjord / readme.md
Created October 3, 2015 21:08
Mithril element remove animation

Parameters

param type description
accessor function accessor for the element whose style should be modified
style Object or Function styles to apply
rm Function function to remove element from view (usually from an array)

#Usage

@nordfjord
nordfjord / reductio_json.coffee
Last active October 1, 2015 17:03
Reductio JSON
reductio = require 'reductio'
_ = require 'lodash'
makeTemplate = (config)->
if !type.call(config) == '[object String]'
return ()-> 'unknown'
if ~config.indexOf '<%'
templ = _.template config
tpl = (d)-> templ d:d
else
@nordfjord
nordfjord / .jshintrc
Last active August 29, 2015 14:13
Basic browserify Gulpfile
{
"browser": true,
"esnext": true,
"globals": {
"require": true,
"exports": true,
"console": true,
"module": true,
"define": true,
"process": true
@nordfjord
nordfjord / SteamGuide.ahk
Created June 27, 2014 09:50
My Autohotkeys
/*
* SteamGuide starts steam big picture when the guide button is pressed for 3 seconds
*/
#SingleInstance force
#NoTrayIcon
WaitKey()
{
KeyWait, Joy7, T3
return ErrorLevel
@nordfjord
nordfjord / Æfiingaplan
Last active August 29, 2015 14:02
Æfingaplan
o-----------------------------------------------------------------------------------------------------------------------------------------o
| Æfingaplan út júní |
o-----------------------------------------------------------------------------------------------------------------------------------------o
| | Mánudagar | Þriðjudagar | Miðvikudagar | Fimmtudagar | Föstudagar | Laugardagar | Sunnudagar |
o--------o---------------------o-------------o---------------------o-------------o---------------------o---------------------o------------o
| Hvað | 3. Skref / Pushaway | Ræktin | 3. Skref / Pushaway | Ræktin | 3. Skref / Pushaway | 3. Skref / Pushaway | fríí |
| Hvenær | 19:00 | | 19:00 | | 19:00 | 19:00 | |
o--------o---------------------o------------