Skip to content

Instantly share code, notes, and snippets.

View fdaciuk's full-sized avatar
🔥

Fernando Daciuk fdaciuk

🔥
View GitHub Profile
@diogomoretti
diogomoretti / fix-jump-owl-carousel.css
Created February 7, 2014 17:53
Fix jump Owl Carousel on Chrome/Safari
@luisfdeandrade
luisfdeandrade / wp_sql_delete_orfans
Created May 23, 2014 20:23
Deleta postmeta orfãos
DELETE pm
FROM wp_postmeta pm
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id
WHERE wp.ID IS NULL
@gugaalves
gugaalves / functions.php
Created July 17, 2014 23:30
Vendo qual arquivo do tema está rodando!
add_action('admin_bar_menu', 'show_template');
function show_template() {
global $template;
print_r($template);
}
'instanceof' tests results on the objects returned from the method/property below.
IE 8
NodeList HTMLCollection StaticNodeList
all X
children X
childNodes X
getElementsByName X
getElementsByTagName X
getElementsByClassName X
@blude
blude / gist:996352
Created May 27, 2011 22:52
Terminal bonitinho :)
[[ -s "/Users/saulo/.rvm/scripts/rvm" ]] && source "/Users/saulo/.rvm/scripts/rvm" # This loads RVM into a shell session.
PATH=$PATH:/usr/local/mysql/bin/
DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# Make bash check its window size after a process completes
shopt -s checkwinsize
@zeuxisoo
zeuxisoo / gist:998404
Created May 30, 2011 03:13
git-ftp.sh install and usage note
@20after4
20after4 / iterm-bash_profile.sh
Created August 27, 2011 22:45
.bash_profile for iTerm2 tabs colored by tty
if [ "iTerm.app" == "$TERM_PROGRAM" ] ; then
# set up an array of RGB values
tabcolors[0]="244,0,200"
tabcolors[1]="0,200,244"
tabcolors[2]="68,250,132"
tabcolors[3]="250,68,132"
tabcolors[4]="250,132,68"
tabcolors[5]="220,200,100"
TTYNUM=`ps -p $$ -o tty= | cut -c 5,6,7`
@WolfgangKluge
WolfgangKluge / gist:1321202
Created October 27, 2011 23:34
jshint code coverage
#!/usr/bin/env node
(function () {
"use strict";
var coveraje = require("coveraje").coveraje,
fs = require("fs"),
path = require("path"),
jshfilePath = path.resolve("../jshint.js");
@romuloctba
romuloctba / functions.php
Created September 24, 2014 04:33
Add all custom fields to JSON REST API wordpress
function json_api_prepare_post( $post_response, $post, $context ) {
$field = get_post_custom($post['ID']);
$post_response['custom-fields'] = $field;
return $post_response;
}
add_filter( 'json_prepare_post', 'json_api_prepare_post', 10, 3 );
@fcingolani
fcingolani / socialite-extras.js
Created October 12, 2012 03:32
Socialite.js - Facebook Like Box and Twitter Embedded Timeline extension
(function() {
Socialite.widget('facebook', 'likebox', {
init: function(instance) {
var el;
el = document.createElement('div');
el.className = 'fb-like-box';
Socialite.copyDataAttributes(instance.el, el);
instance.el.appendChild(el);
if (window.FB && window.FB.XFBML) {