Skip to content

Instantly share code, notes, and snippets.

💭
never stop.

Matheus Pratta MatheusMK3

💭
never stop.
Block or report user

Report or block MatheusMK3

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
@SimonSimCity
SimonSimCity / pagination.html.twig
Last active Dec 26, 2019
A gist for pagination in Twig, based on the total number of pages, the current page and some URL-settings.
View pagination.html.twig
{#
Source: http://dev.dbl-a.com/symfony-2-0/symfony2-and-twig-pagination/
Updated by: Simon Schick <simonsimcity@gmail.com>
Parameters:
* 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
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
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
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
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
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;
You can’t perform that action at this time.