Skip to content

Instantly share code, notes, and snippets.

View lucasmotta's full-sized avatar

Lucas Motta lucasmotta

View GitHub Profile
@og2t
og2t / AS3 HexColor transform utils
Created January 28, 2010 09:24
AS3 Hex color utils
/*---------------------------------------------------------------------------------------------
[AS3] HexColor
=======================================================================================
Based on: http://www.razorberry.com/blog/archives/2006/03/28/colour-utility-methods/
VERSION HISTORY:
v0.1 Born on 2008-08-07
@og2t
og2t / ExtendedArray
Created March 10, 2010 11:59
AS3 Extended array (using proxy)
/*---------------------------------------------------------------------------------------------
[AS3] ExtendedArray
=======================================================================================
Some methods by Yossy, http://www.libspark.org/
VERSION HISTORY:
v0.1 Born on 2008-04-18
@MicheleBertoli
MicheleBertoli / react-router-context.js
Created July 17, 2015 15:42
If you want to test a react 0.13.3 component and you are using the react-router 0.13.3, you need this:
import React, {Component} from 'react';
export default ReactRouterContext = (Element) => {
class RouterStub {}
RouterStub.makePath = () => {};
RouterStub.makeHref = () => {};
RouterStub.transitionTo = () => {};
RouterStub.replaceWith = () => {};
@Grawl
Grawl / prefix-free.styl
Created February 4, 2012 08:29 — forked from sapegin/gist:1735915
-prefix-free for Stylus
// #### it's compilable -prefix-free
// © 2011 Artem Sapegin http://sapegin.ru
// + 2011 Grawl http://grawl.ru
// + radial-gradient and other rules with vendor prefixes added by Grawl.
// add your fixes to My table of vendor prefixes there: http://goo.gl/3hPfR
/* mask:
parameter()
-webkit-parameter arguments
-moz-parameter arguments
-ms-parameter arguments
@millermedeiros
millermedeiros / updateLibs.sh
Last active October 11, 2015 12:37
Shell script to update 3rd party libs
#!/bin/sh
# This shell script is used to bootstrap the app and update external libraries
#
# ====== IMPORTANT ======
#
# it may break application if 3rd party libs aren't backwards compatible
# or if libs were edited locally, use with care !!!
@burin
burin / gist:3840737
Created October 5, 2012 16:06
Full screen web app in iPhone 5 (save to home screen)
<!-- standard viewport tag to set the viewport to the device's width
, Android 2.3 devices need this so 100% width works properly and
doesn't allow children to blow up the viewport width-->
<meta name="viewport" id="vp" content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width" />
<!-- width=device-width causes the iPhone 5 to letterbox the app, so
we want to exclude it for iPhone 5 to allow full screen apps -->
<meta name="viewport" id="vp" content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)" />
<!-- provide the splash screens for iPhone 5 and previous -->
<link href="assets/splashs/splash_1096.png" rel="apple-touch-startup-image" media="(device-height: 568px)">
<link href="assets/splashs/splash_iphone_2x.png" rel="apple-touch-startup-image" sizes="640x960" media="(device-height: 480px)">
@kyohei8
kyohei8 / browserify.coffee
Last active June 25, 2017 01:26
gulp with browserify/watchify multiple file compile task
gulp = require 'gulp'
browserify = require 'browserify'
watchify = require 'watchify'
source = require 'vinyl-source-stream'
colors = require 'colors'
files = [
{
@MicheleBertoli
MicheleBertoli / demo.js
Created August 31, 2016 10:49
Erdux - Unpredictable state container for JavaScript apps
class DecrementAction extends Error {}
class IncrementAction extends Error {}
const reducer = (state, error) => {
switch (error.constructor) {
case DecrementAction:
return state - 1
case IncrementAction:
return state + 1
/* eslint react/jsx-props-no-spreading:0 */
import React, { ReactNode } from 'react';
import { ViewProps } from 'react-native';
import {
SpaceProps,
ColorProps,
LayoutProps,
FlexProps,
FlexDirectionProps,
AlignItemsProps,
@sibelius
sibelius / metro.config.js
Created May 7, 2019 14:38
Metro config that works well with monorepo
/**
* Metro configuration for React Native
* https://github.com/facebook/react-native
*
* @format
*/
const path = require('path');
const { FileStore } = require('metro-cache');