Skip to content

Instantly share code, notes, and snippets.

Marco Barbosa marcobarbosa

Block or report user

Report or block marcobarbosa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@marcobarbosa
marcobarbosa / filter-branch.sh
Created Aug 31, 2015
Remove binary from GIT history
View filter-branch.sh
#!/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: http://stackoverflow.com/a/1599291
// 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
marcobarbosa / loop.php
Created May 12, 2014
wordpress the loop
View loop.php
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
//
// Post Content here
//
} // end while
} // end if
?>
@marcobarbosa
marcobarbosa / rio-featured-images.php
Created May 2, 2014
Example of using responsive-io with Wordpress featured images
View rio-featured-images.php
@marcobarbosa
marcobarbosa / Wordpress custom tiny_mce
Last active Jan 4, 2016
Wordpress tiny_mce toolbar customizations
View Wordpress custom tiny_mce
<?php
/**
* 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
marcobarbosa / gist:7945005
Last active Dec 31, 2015
keyframe animation example
View gist:7945005
@keyframes foobar {
0%,
50% {
opacity: 0;
}
54%,
80% {
opacity: 1;
}
84%,
@marcobarbosa
marcobarbosa / gist:7941547
Created Dec 13, 2013
animate element using SMIL
View gist:7941547
<animate attributeType="XML"
attributeName="x"
from="-100" to="120"
dur="10s"
repeatCount="indefinite"/>
View README
Drop in replace functions for setTimeout() & setInterval() that
make use of requestAnimationFrame() for performance where available
http://www.joelambert.co.uk
Copyright 2011, Joe Lambert.
Free to use under the MIT license.
http://www.opensource.org/licenses/mit-license.php
View flight-delegation.js
define(
[
'flight/component'
],
function (defineComponent) {
return defineComponent(helloWorld);
@marcobarbosa
marcobarbosa / front-end-setup.md
Last active Nov 29, 2016
Reference for the steps necessary to code a good front-end project on a Mac.
View front-end-setup.md

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.

XCode

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

You can’t perform that action at this time.