Skip to content

Instantly share code, notes, and snippets.

Salvio Furbino Elias salviof

Block or report user

Report or block salviof

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
andyshinn / Dockerfile
Last active Jan 13, 2020
Postal on Docker
View Dockerfile
FROM ruby:2.3-onbuild
VOLUME /opt/postal/config
ENV AM_CONFIG_ROOT /opt/postal/config
RUN gem install procodile
RUN apt-get update -qq && apt-get install -yqq nodejs
fhferreira / jquery-mask-nono-digito.js
Last active Dec 10, 2018
Jquery Mask Nono Digito
View jquery-mask-nono-digito.js
// jQuery Masked Input
$('#celular').mask("(99) 9999-9999?9").ready(function(event) {
var target, phone, element;
target = (event.currentTarget) ? event.currentTarget : event.srcElement;
phone = target.value.replace(/\D/g, '');
element = $(target);
if(phone.length > 10) {
element.mask("(99) 99999-999?9");
} else {
tim-reynolds / jquery.centerit.js
Created Jun 29, 2012
Setting scroll to center on an element (jQuery) - Super simple stuff
View jquery.centerit.js
If you have a horizontal (or vertical) scroll container and want to set the scroll to center a specific
element in the container you can use the following super simple technique.
I'm going to show you how it was derived, because it's important to know why, not just how.
<div class="outer">
chrisvanpatten /
Created Mar 7, 2012
WordPress Admin Tabs


Believe it or not, WordPress doesn't have a fully-fleshed out common tab style for plugins or theme authors to use in metaboxes.

The style exists for categories, but it hasn't been fully adapted for the half-complete wp-tab setup. Trac ticket #17959 has a solution that not only fleshes the style but it also adds a global JavaScript file to give the wp-tab HTML some action. Until that ticket is accepted into core, this Gist adapts that code so it's available to use independently in your theme or plugin.


Just enqueue the CSS and JavaScript in the admin_enqueue_scripts script hook and drop the tab HTML in a metabox. It will automatically adapt to the normal and side column widths, much like category tabs.

package de.ppi.util;
import java.util.Arrays;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.binary.Hex;
import org.apache.commons.codec.digest.DigestUtils;
You can’t perform that action at this time.