Skip to content

Instantly share code, notes, and snippets.

never stop.

Matheus Pratta MatheusMK3

never stop.
View GitHub Profile
ogrrd / dnsmasq OS
Last active Jan 17, 2021
Setup dnsmasq on OS X
View dnsmasq OS

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.



diegoprates / gist:5047663
Last active Oct 24, 2020
Tradução do jQuery validation plugin para pt-BR.
View gist:5047663
* Translated default messages for the jQuery validation plugin.
* Locale: PT_BR
jQuery.extend(jQuery.validator.messages, {
required: "Este campo é requerido.",
remote: "Por favor, corrija este campo.",
email: "Por favor, forneça um endereço eletrônico válido.",
url: "Por favor, forneça uma URL válida.",
date: "Por favor, forneça uma data válida.",
SimonSimCity / pagination.html.twig
Last active Oct 9, 2020
A gist for pagination in Twig, based on the total number of pages, the current page and some URL-settings.
View pagination.html.twig
Updated by: Simon Schick <>
* currentFilters (array) : associative array that contains the current route-arguments
* currentPage (int) : the current page you are in
* paginationPath (string) : the route name to use for links
* showAlwaysFirstAndLast (bool) : Always show first and last link (just disabled)
* lastPage (int) : represents the total number of existing pages
jameskoster / functions.php
Created Jan 12, 2013
WooCommerce - hide ratings on product loop
View functions.php
// Remove the product rating display on product loops
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 );
Integralist / 1. Example.scss
Created Oct 22, 2012
Sass Mixin for CSS3 Animations
View 1. Example.scss
@include keyframe(fadeout) {
0% {
opacity: 1;
100% {
opacity: 0;
devinrhode2 / clean-scrollbar.css
Created May 2, 2012
Like, basically PERFECT scrollbars
View clean-scrollbar.css
* Like, basically PERFECT scrollbars
It's pure CSS.
Since a quick google search will confirm people going crazy about Mac OS Lion scrollbars...
this has no fade-out effect.
In Mac OS Lion, the lowest common denominator is always showing scrollbars by a setting.
micho / wysihtml5-resize.js
Created Mar 29, 2012
wysihtml5 resize plugin. Depends on jQuery and Underscore
View wysihtml5-resize.js
(function () {
var setupRegularResize, setupIframeResize, e;
function bind(a, b) {
return function () {
return a.apply(b, arguments);
setupRegularResize = (function () {
View slugify.js
function slugify(text)
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
penguinboy / Object Flatten
Created Jan 2, 2011
Flatten javascript objects into a single-depth object
View Object Flatten
var flattenObject = function(ob) {
var toReturn = {};
for (var i in ob) {
if (!ob.hasOwnProperty(i)) continue;
if ((typeof ob[i]) == 'object') {
var flatObject = flattenObject(ob[i]);
for (var x in flatObject) {
if (!flatObject.hasOwnProperty(x)) continue;