Skip to content

Instantly share code, notes, and snippets.

View mokargas's full-sized avatar
🏠
Working from home

Mo mokargas

🏠
Working from home
View GitHub Profile
@mokargas
mokargas / Basic Filter Mixin
Created November 25, 2013 00:25
Basic Filter Mixin
@mixin filter( $var ){
-webkit-filter: $var;
-moz-filter: $var;
-ms-filter: $var;
-o-filter: $var;
filter: $var;
}
.blur{
@include filter(blur(20px));
@mokargas
mokargas / gist:7fa5e84c617890cf5b52
Last active December 29, 2015 07:09
Disable selection and cursor
//TODO: Some of these prefixes need can probably be removed.
.disable-selection{
-webkit-touch-callout:none;
-webkit-user-select:none;
-khtml-user-select:none;
-moz-user-select:none;
-ms-user-select:none;
user-select:none;
cursor:none!important;
}

You'll need your own WeatherUnderground API Key, and a PiLite (or any LED matrix/Screen) on Serial

[{"id":"1ef38d5a.e10c73","type":"serial-port","serialport":"/dev/ttyAMA0","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false},{"id":"b704de85.48fb2","type":"serial out","name":"PiLite LED Matrix","serial":"1ef38d5a.e10c73","x":729,"y":196,"z":"ebdce6bb.142318","wires":[]},{"id":"3e9eeed.fc16112","type":"debug","name":"","active":true,"console":"false","complete":"payload","x":486,"y":72,"z":"ebdce6bb.142318","wires":[]},{"id":"9df92786.6206d8","type":"wunderground in","name":"Poll WeatherUnderground API","lon":"","lat":"","city":"Melbourne","country":"Australia","x":179,"y":177,"z":"ebdce6bb.142318","wires":[["3e9eeed.fc16112","87a30496.785cf8"]]},{"id":"87a30496.785cf8","type":"function","name":"Filtering","func":"var payload = {payload: msg.payload.weather + \" - \" + msg.payload.tempc +\" C\"} ;\nreturn payload;","outputs
@mokargas
mokargas / server.js
Created September 22, 2015 23:44
Boilerplate for Node.js server, devmode
//Incs
var express = require('express');
var path = require('path');
var cors = require('cors');
var bodyParser = require('body-parser');
var nconf = require('nconf');
//Set base root for modules
process.env.root = __dirname;
@mokargas
mokargas / spanwrap.js
Last active February 16, 2017 01:08
Wrap text with spans
/**
* Wraps a span tag around each character/letter
*
* @param {string} str The string to transform
* @returns {string} Input as split by chars/letters
*/
wrapChars(str) {
return str.replace(/./g, "<span>$&</span>").replace(/\s/g, "<span>&nbsp;</span>");
},
# =============== #
# Unity generated #
# =============== #
Temp/
Obj/
UnityGenerated/
Library/
Assets/AssetStoreTools*
# ===================================== #
@mokargas
mokargas / webpack.config.js
Last active February 16, 2017 01:10
Stub Webpack config. ES6, babel, sass, css modules (working version)
//Dev config ONLY
var path = require('path'); // eslint-disable-line no-var
var webpack = require('webpack'); // eslint-disable-line no-var
var merge = require('webpack-merge'); // eslint-disable-line no-var
var HtmlWebpackPlugin = require('html-webpack-plugin'); // eslint-disable-line no-var
var NpmInstallPlugin = require('npm-install-webpack-plugin'); // eslint-disable-line no-var
var autoprefixer = require('autoprefixer'); // eslint-disable-line no-var
var ExtractTextPlugin = require('extract-text-webpack-plugin'); // eslint-disable-line no-var
@mokargas
mokargas / Phaser.jshintrc
Last active February 16, 2017 01:07
Basic Phaser jshint config
{
"globals" : { "Phaser": false, "PIXI": false, "p2": false, "CocoonJS": false, "process": false, "JSON": false },
// Ignore Environment Globals
"browser" : true, // Standard browser globals e.g. `window`, `document`.
// Development
"devel" : true, // Allow developments statements e.g. `console.log();`.
// ECMAScript Support

Events commonly used in Fabric.js http://fabricjs.com/

##Canvas##

after:render — fired continuously after each frame is rendered before:render — fired before each frame is rendered canvas:cleared — fired after a call to canvas.clear()

##Mouse##

# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
# Change these settings to your own preference