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 / 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 / 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 / chmodr.sh
Last active November 25, 2015 02:26
Change files and directories permissions recursively.
#!/bin/sh
#
# chmodr.sh
#
usage()
{
echo "Usage: $0 [-d DIRPERMS] [-f FILEPERMS] PATH"
exit 1
@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 (\(.*\))
@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 / APACHE: .htaccess pushstate
Created January 8, 2016 02:56 — forked from rayfranco/APACHE: .htaccess pushstate
.htaccess for HTML5 Pushstate support
<ifModule mod_rewrite.c>
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.html
</ifModule>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Socket</title>
<script src="https://radiovozes.com:8001/socket.io/socket.io.js"></script>
</head>
<body>
<h2 id="container"></h2>
@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,