Skip to content

Instantly share code, notes, and snippets.

View UbaldoRosas's full-sized avatar
🛍️
Focusing on Shopify Development

Balo UbaldoRosas

🛍️
Focusing on Shopify Development
View GitHub Profile
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 9, 2024 19:52
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@chrisjhoughton
chrisjhoughton / wait-el.js
Last active October 6, 2023 09:46
Wait for an element to exist on the page with jQuery
var waitForEl = function(selector, callback) {
if (jQuery(selector).length) {
callback();
} else {
setTimeout(function() {
waitForEl(selector, callback);
}, 100);
}
};
@dkesberg
dkesberg / jQuery.validator.filesize.js
Created November 15, 2013 08:32
jQuery Validator method for maximum filesize
jQuery.validator.addMethod("filesize_max", function(value, element, param) {
var isOptional = this.optional(element),
file;
if(isOptional) {
return isOptional;
}
if ($(element).attr("type") === "file") {
@lukearmstrong
lukearmstrong / shopify-pagination.liquid.html
Last active December 6, 2023 00:41
Shopify - Show links to all pages in pagination, gets rid of the "..."
<div id="pagination">
<ul>
{% if paginate.previous %}
<li>{{ paginate.previous.title | link_to: paginate.previous.url }}</li>
{% endif %}
{% for i in (1..paginate.pages) %}
{% if paginate.current_page == i %}
<li>{{ i }}</li>
@lamprosg
lamprosg / main.php
Created July 22, 2012 21:11
Resize image on the fly in PHP
<?php
//How to use it
//Just call timthumb.php with appropriate arguments, For example:
<img src="/script/timthumb.php?src=/some/path/myimage.png&w=100&h=80" alt="resized image" />
/* http://viralpatel.net/blogs/resize-image-dynamically-php/ */
?>
@gre
gre / easing.js
Last active May 8, 2024 14:30
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {