Skip to content

Instantly share code, notes, and snippets.

View fczuardi's full-sized avatar

Fabricio C Zuardi fczuardi

View GitHub Profile
@fczuardi
fczuardi / gist:11026693
Created April 18, 2014 05:55
gulp error after assemble 0.5.0 update
[gulp] Starting 'web:buildPages'...
Error: The partial day_table could not be found
at new Error (<anonymous>)
at Error.Exception (/Users/fabricio/trampos/taboca/companionb/node_modules/gulp-assemble/node_modules/assemble/node_modules/handlebars/dist/cjs/handlebars/exception.js:13:41)
at Object.invokePartial (/Users/fabricio/trampos/taboca/companionb/node_modules/gulp-assemble/node_modules/assemble/node_modules/handlebars/dist/cjs/handlebars/runtime.js:163:11)
at Object.invokePartialWrapper [as invokePartial] (/Users/fabricio/trampos/taboca/companionb/node_modules/gulp-assemble/node_modules/assemble/node_modules/handlebars/dist/cjs/handlebars/runtime.js:42:39)
at Object.eval (eval at <anonymous> (/Users/fabricio/trampos/taboca/companionb/node_modules/gulp-assemble/node_modules/assemble/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:181:23), <anonymous>:3:17)
at Object.prog [as fn] (/Users/fabricio/trampos/taboca/companionb/node_modules/gulp-assemble/node_mo
@fczuardi
fczuardi / wordpress.js
Created February 11, 2015 17:52
patch for nodebb embed comments plugin
(function() {
"use strict";
var articlePath = window.location.protocol + '//' + window.location.host + window.location.pathname;
var pluginURL = nodeBBURL + '/plugins/nodebb-plugin-blog-comments',
savedText, nodebbDiv, contentDiv, commentsDiv, commentsCounter, commentsAuthor, commentsCategory;
var stylesheet = document.createElement("link");
stylesheet.setAttribute("rel", "stylesheet");
@fczuardi
fczuardi / embed.patch.js
Last active August 29, 2015 14:15
nodebb-plugin-blog-comment monkey-patch
if (data.isAdmin) {
//var adminXHR = newXHR();
//adminXHR.open('GET', '/ghost/api/v0.1/posts/' + articleID);
//adminXHR.onload = function() {
//if (adminXHR.status >= 200 && adminXHR.status < 400) {
//var articleData = JSON.parse(adminXHR.responseText),
//markdown = articleData.markdown.split('\n\n').slice(0,2).join('\n\n') + '\n\n**Click [here]('+articlePath+') to see the fu$
var markdown = '\n\n**Click [here]('+articlePath+') to see the full blog post**';
var title = $('.post-title').text();
document.getElementBy
@fczuardi
fczuardi / 0_reuse_code.js
Last active August 29, 2015 14:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@fczuardi
fczuardi / 0_setup.md
Last active August 29, 2015 14:16
ReactJS a partir do zero

Requisito: [io.js][iojs]

instalar [nvm][nvm]

curl https://raw.githubusercontent.com/creationix/nvm/v0.23.3/install.sh | bash

instalar io.js

nvm install iojs

@fczuardi
fczuardi / ace.sh
Last active August 29, 2015 14:17
old=2
testmode=2
if [[ ($old != 1) && ($testmode != 1) ]]
then
echo "temporary files"
else
echo "something else"
fi
@fczuardi
fczuardi / arguments.sh
Created March 17, 2015 19:36
bash command line arguments
#!/bin/bash
arguments=( "$@" )
count=0
for arg in "${arguments[@]}"
do
((count++))
nextArg="${arguments[count]}"
echo "$arg $nextArg"
done
||trrsf.com.br*/admanager.js$domain=terra.com.br
@fczuardi
fczuardi / gist:26284f161349f17a9226
Created May 22, 2015 19:47
uncluttered facebook 2015-05-22
! blacklist first
akamaihd.net/rsrc.php/v2/*.js
akamaihd.net/rsrc.php/v2/*.css
akamaihd.net/rsrc.php/v2/*.png
akamaihd.net/rsrc.php/v2/*.gif
fbcdn-profile*.akamaihd.net
facebook.com/ai.php
facebook.com/xti.php
window.store = {
localStoreSupport : function() {
try {
return 'localStorage' in window && window['localStorage'] !== null;
} catch (e) {
return false;
}
},
set : function(name,value,days) {
if (days) {