(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// Some really hacky code being used in my next blog redesign. | |
// by Peter Sobot (psobot.com) on December 16, 2012 | |
;(function ( $, window, document, undefined ) { | |
var pluginName = 'punchout', | |
defaults = { | |
}; | |
function Plugin( element, options ) { | |
this.element = element; |
git fetch --all | |
git reset --hard origin/master | |
git pull origin master |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
/** | |
* @param $query | |
* @param $relation_name | |
* @param string $operator | |
* @param string $type | |
* @param bool $where | |
* @return mixed | |
*/ | |
public function scopeModelJoin($query, $relation_name, $operator = '=', $type = 'left', $where = false) | |
{ |
@function up-to($list, $index) { | |
$l: (); | |
@each $e in $list { | |
@if length($l) < $index { | |
$l: append($l, $e, list-separator($list)); | |
} | |
} | |
@return $l; | |
} |
var PIXI = require('pixi.js') | |
console.log(PIXI) |
The following guide will show you how to deploy a simple microservice written in JavaScript using 𝚫 now.
It uses Open Source tools that are widely available, tested and understood:
CREATE OR REPLACE FUNCTION max (uuid, uuid) | |
RETURNS uuid AS $$ | |
BEGIN | |
IF $1 IS NULL OR $1 < $2 THEN | |
RETURN $2; | |
END IF; | |
RETURN $1; | |
END; | |
$$ LANGUAGE plpgsql; |
Simple state management with xstream
and ramda
, in more transparent fashion than onionify
import * as R from 'ramda'
// first we create factory for making special state stream
// that will hold our stream value and will be modified with supplied streams of reducers
type StateReducer<T> = (state: T) => T
/* | |
* PixiJS Background Cover/Contain Script | |
* Returns object | |
* . { | |
* container: PixiJS Container | |
* . doResize: Resize callback | |
* } | |
* ARGS: | |
* bgSize: Object with x and y representing the width and height of background. Example: {x:1280,y:720} | |
* inputSprite: Pixi Sprite containing a loaded image or other asset. Make sure you preload assets into this sprite. |