Skip to content

Instantly share code, notes, and snippets.

View gilbarbara's full-sized avatar
💥
Keep Buggering On

Gil Barbara gilbarbara

💥
Keep Buggering On
View GitHub Profile
@gilbarbara
gilbarbara / Readme.md
Last active December 20, 2015 13:39
Bubble Tree example.

Implementation based on Gregor Aisch's work with Raphäel

@gilbarbara
gilbarbara / Facebook SDK for JavaScript
Created January 27, 2014 16:30
Facebook SDK for JavaScript
/**
* Facebook SDK for JavaScript
* The Facebook SDK for JavaScript provides a rich set of client-side functionality for adding Social Plugins, making API calls and implementing Facebook Login.
*/
/**
* @fileoverview Externs for Facebook Javascript SDK
* @see http://developers.facebook.com/docs/reference/javascript/
* @externs
*/
@gilbarbara
gilbarbara / gist:ee074d05f1850661578c
Last active August 29, 2015 14:06
fun stuff for plug.dj
$('#playback').append('<img id="disco-ball" src="http://gilbarbara.com/ide/discoBall.gif" style="position:absolute;top: 0px;left: 29%;opacity:0;">');
$('#playback').append('<img class="dancers" src="http://gilbarbara.com/ide/dancer.gif" style="position:absolute;top: 70px;left: -26%;opacity:0;""><img class="dancers" src="http://gilbarbara.com/ide/dancer.gif" style="position:absolute;top: 70px;right:-26%;opacity:0;"">');
$('#disco-ball').animate({ top: 150, opacity: 1 }, 2000);$('.dancers').delay(1000).animate({ opacity: 1 }, 2000);
@gilbarbara
gilbarbara / .scss-lint.yml
Last active August 29, 2015 14:18
.scss-lint.yml configuration
linters:
BangFormat:
enabled: true
space_before_bang: true
space_after_bang: false
BorderZero:
enabled: true
ColorKeyword:
@gilbarbara
gilbarbara / InputValidate.jsx
Last active September 6, 2017 17:29
React Input component with formsy-react validation
var React = require('react/addons'),
Bootstrap = require('react-bootstrap'),
Formsy = require('formsy-react');
var InputValidate = React.createClass({
mixins: [Formsy.Mixin, React.addons.PureRenderMixin],
getDefaultProps: function () {
return {
autocomplete: 'off',
@gilbarbara
gilbarbara / .eslintrc
Last active December 31, 2016 21:37
.eslintrc configuration file for ES2015 + react
{
"parser": "babel-eslint",
"ecmaFeatures": {
"modules": true,
"experimentalObjectRestSpread": true
},
"env": {
"amd": true,
"browser": true,
"es6": true,
@gilbarbara
gilbarbara / .eslintrc
Last active April 2, 2018 21:31
.eslintrc configuration file ES2015
{
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,
"destructuring": true,
"modules": true,
"objectLiteralComputedProperties": true,
"objectLiteralShorthandMethods": true,
@gilbarbara
gilbarbara / .editorconfig
Created May 20, 2015 23:56
basic .editorconfig fille
# 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
indent_style = space
indent_size = 4
@gilbarbara
gilbarbara / index.js
Created September 18, 2015 22:14 — forked from royriojas/index.js
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Rebuild to run it on the right
var esformatter = require( 'esformatter' );
var esformatterJSX = require( 'esformatter-jsx' );
var collapser = require( 'esformatter-collapse-objects' )
var throttle = require( 'lodash.throttle' );
var hash = window.location.hash.substr( 1 );
var extend = require('extend');
var params;
@gilbarbara
gilbarbara / gist:7cbf1deb76fc41133ace
Last active December 2, 2015 18:53
Regex ES2015
# replace require to imports
^.*?([^ ]+)\s+= require\(([^ ,;]+)\)[,;]$
import $1 from $2;
# replace React.createClass
[varletcons]+ (\w+) = React.createClass\(\{
export default class $1 extends React.Component {
# replace function with arrows
function (\(.*\))