Skip to content

Instantly share code, notes, and snippets.

marcobarbosa /
Created Aug 31, 2015
Remove binary from GIT history
#!/usr/bin/env bash
git filter-branch --index-filter 'git rm -r -q --cached --ignore-unmatch '$1'' --prune-empty --tag-name-filter cat -- --all
rm -rf .git/refs/original/
git reflog expire --expire=now --all
git gc --prune=now
git gc --aggressive --prune=now
View gist:8e0bab9424baf092c603
// Based on:
// Fixed jshint errors and cleaned up a little.
function createCookie(name, value, days) {
var expires = '';
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
expires = '; expires=' + date.toGMTString();
marcobarbosa / loop.php
Created May 12, 2014
wordpress the loop
View loop.php
if ( have_posts() ) {
while ( have_posts() ) {
// Post Content here
} // end while
} // end if
marcobarbosa / rio-featured-images.php
Created May 2, 2014
Example of using responsive-io with Wordpress featured images
View rio-featured-images.php
marcobarbosa / Wordpress custom tiny_mce
Last active Jan 4, 2016
Wordpress tiny_mce toolbar customizations
View Wordpress custom tiny_mce
* Customise the editor buttons.
* This function takes care of the first row.
* @param Array $buttons Buttons that are going to be displayed if unchanged.
function tiny_mce_buttons($buttons) {
marcobarbosa / gist:7945005
Last active Dec 31, 2015
keyframe animation example
View gist:7945005
@keyframes foobar {
50% {
opacity: 0;
80% {
opacity: 1;
marcobarbosa / gist:7941547
Created Dec 13, 2013
animate element using SMIL
View gist:7941547
<animate attributeType="XML"
from="-100" to="120"
Drop in replace functions for setTimeout() & setInterval() that
make use of requestAnimationFrame() for performance where available
Copyright 2011, Joe Lambert.
Free to use under the MIT license.
View flight-delegation.js
function (defineComponent) {
return defineComponent(helloWorld);
marcobarbosa /
Last active Nov 29, 2016
Reference for the steps necessary to code a good front-end project on a Mac.

Front-end coding environment set-up

This guide covers pretty much all that you need to have installed in your Mac for a top notch front-end coding environment.

This guide also assumes that you are going to use yeoman or grunt for your project.


It is recommended that you have Xcode installed and it's Command Line Tools to give you any command line binary that you might need (such as wget). You can also download it within Xcode itself