Skip to content

Instantly share code, notes, and snippets.

import phaser from 'phaser';
// Assets
import grass from '../assets/grass.png';
/**
* Class represent the Preload of the Game
**/
class Preloader extends phaser.Scene {
/**
<form>
<ul class="form-style-1">
<li><label>Full Name <span class="required">*</span></label><input type="text" name="field1" class="field-divided" placeholder="First" /> <input type="text" name="field2" class="field-divided" placeholder="Last" /></li>
<li>
<label>Email <span class="required">*</span></label>
<input type="email" name="field3" class="field-long" />
</li>
<li>
<label>Subject</label>
<select name="field4" class="field-select">
.form-style-1 {​ margin:10px auto; max-width: 400px; padding: 20px 12px 10px 20px; font: 13px "Lucida Sans Unicode", "Lucida Grande", sans-serif; }​ .form-style-1 li {​ padding: 0; display: block; list-style: none; margin: 10px 0 0 0; }​ .form-style-1 label{​ margin:0 0 3px 0; padding:0px; display:block; font-weight: bold; }​ .form-style-1 input[type=text], .form-style-1 input[type=date], .form-style-1 input[type=datetime], .form-style-1 input[type=number], .form-style-1 input[type=search], .form-style-1 input[type=time], .form-style-1 input[type=url], .form-style-1 input[type=email], textarea, select{​ box-sizing: border-box; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; border:1px solid #BEBEBE; padding: 7px; margin:0px; -webkit-transition: all 0.30s ease-in-out; -moz-transition: all 0.30s ease-in-out; -ms-transition: all 0.30s ease-in-out; -o-transition: all 0.30s ease-in-out; outline: none; }​ .form-style-1 input[type=text]:focus, .form-style-1 input[type=date]:focus, .form-style-1 input[ty
@wmena
wmena / MyComponent.jsx
Created January 29, 2019 11:51 — forked from tracker1/MyComponent.jsx
Simple pattern for loading async data with react, redux and redux-thunk middleware
import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import * as Actions from './action';
const mapStateToProps = ({ loaded, loading, error, data }) = ({ loaded, loading, error, data });
const mapDispatchToProps = dispatch => ({ action: bindActionCreators(Actions, dispatch) });
export class MyComponent extends Component {
load = _ => this.props.action.load(this.props.id);
@wmena
wmena / workflow.md
Created September 19, 2017 14:18 — forked from zaach/workflow.md

Semantic Versioning

Details: http://semver.org/, http://apr.apache.org/versioning.html

Versions are denoted using a standard triplet of integers: MAJOR.MINOR.PATCH. The basic intent is that MAJOR versions are incompatible, large-scale upgrades of the API. MINOR versions retain source and binary compatibility with older minor versions, and changes in the PATCH level are perfectly compatible, forwards and backwards.

Patch level changes could also be for correcting incorrect APIs. In this case, the previous patch release may be incompatible, but because of bugs.

Minor versions may introduce new features, but do not alter any of the previous API.

@wmena
wmena / click-burst.js
Created January 18, 2017 09:14
Mo.js + React Example
/*
* A simple React component
*/
const burst = new mojs.Burst({
left: 0, top: 0,
radius: { 4: 19 },
angle: 45,
children: {
shape: 'line',
radius: 3,
@wmena
wmena / magento
Created January 17, 2017 12:00 — forked from miped/magento
nginx + php-fpm magento setup
# /etc/nginx/sites-enabled/magento
server {
listen 80;
server_name ec2-184-72-68-219.compute-1.amazonaws.com;
root /var/www/magento/;
access_log /var/log/nginx/magento-access_log;
error_log /var/log/nginx/magento-error_log;
location / {
@wmena
wmena / react-event-handler-papp-props.jsx
Created January 16, 2017 13:38 — forked from sergiodxa/react-event-handler-papp-props.jsx
Example of how to use partial application to pass parameters to event handlers in React
// with props
import React, { Component } from 'react';
// this method work as a our base `handleClick` function
function handleClick(name, event) {
alert(`hello ${name}`);
}
class App extends Component {
constructor(props) {
"scripts": {
"dev-server": "webpack-dev-server — config webpack-dev-server.config.js — progress — colors — port 2992 — inline",
"hot-dev-server": "webpack-dev-server — config webpack-hot-dev-server.config.js — hot — progress — colors — port 2992 — inline",
"build": "webpack — config webpack-production.config.js — progress — profile — colors",
"start-dev": "node lib/server-development",
"start": "node lib/server-production"
}
@wmena
wmena / app.coffee
Last active August 29, 2015 14:26 — forked from webgio/app.coffee
Marionette.js module to manage authentication. Needs a server method that checks credentials returning true or false. Started from this blog post code: http://clintberry.com/2012/backbone-js-apps-authentication-tutorial/
App = new Marionette.Application();
App.addRegions {
"headerRegion": "#header"
"topMenuRegion": "#top-menu"
"mainRegion" : "#main"
}
App.on 'initialize:after', ->
Backbone.history.start()