Skip to content

Instantly share code, notes, and snippets.

View hans2103's full-sized avatar
🏠
Working from home

Hans Kuijpers hans2103

🏠
Working from home
View GitHub Profile
@tracend
tracend / common.loading.css
Last active February 21, 2024 11:59
CSS3 Loading Overlay
body.loading:after {
/* with no content, nothing is rendered */
content: "";
position: fixed;
/* element stretched to cover during rotation an aspect ratio up to 1/10 */
top: -500%;
left: -500%;
right: -500%;
bottom: -500%;
z-index: 9999;
@peterjaap
peterjaap / magento-testing-scenarios.md
Last active May 13, 2025 08:03
Magento testing scenarios

Magento testing scenarios

For use after an upgrade to verify the correct working of Magento

SHIP IT

Frontend

General

  • Activate all logs on the server (PHP, MySQL, Magento, mail, etc)
  • Check meta tags in HTML
@kubaceg
kubaceg / databaseBackup.sh
Last active May 1, 2017 11:32
n98Magerun magento database backup script, creates daily, weekly and monthly dumps
#!/bin/bash
#CONFIG
backupDir='/mnt/backup'
magentoDir='/var/www/magento/htdocs'
magerunPath='/usr/bin/n98-magerun.phar'
#NUMBER OF DAYS TO KEEP BACKUPS
dailyKeepDays=7
weeklyKeepDays=30
@heesienooi
heesienooi / pagination.php
Created September 23, 2014 05:18
Joomla pagination override - Reduce number of displayed pages
<?php
/**
* By default joomla display 10 pages in pagination. This file allows
* us to customize the number of displayed pages.
*
* Simply add this file to $template/html/pagination.php and
* change $displayedPages variable.
*/
defined('_JEXEC') or die('Restricted access');
@markvds
markvds / filterable_attributes.php
Created February 25, 2015 09:17
Magento shell script (place it in /shell) to output all filterable attributes. You can then copy/paste it into robots.txt to effectively stop bots from indexing your layered navigation. See also https://www.byte.nl/blog/zoekmachine-bots-en-serverbelasting/
<?php
require_once 'abstract.php';
class Mage_Shell_Filterable_Attributes extends Mage_Shell_Abstract
{
/**
* Run script
*
*/
public function run()
@ttscoff
ttscoff / font_grabber.rb
Last active June 6, 2025 20:51
Give it a <link> from Google fonts and get back CSS with fonts embedded
#!/usr/bin/ruby
# encoding: utf-8
# Grab google web fonts and embed them as base64 data URIs
# <http://brettterpstra.com/2015/03/14/embedding-google-web-fonts/>
require 'base64'
if ARGV.length > 0
input = ARGV
elsif STDIN.stat.size > 0
input = STDIN.read.strip.split(/\n+/)
@jonathonbyrdziak
jonathonbyrdziak / Collection.php
Created April 17, 2015 14:22
Sorting Configurable Product Options
<?php
/**
* Magento 1.9.1 has a problem Sorting Configurable Product Attribute Options and Dropdowns
* [solved] File Patched by Jonathon Byrd
* http://magentosupport.help/knowledgebase/solved-sort-configurable-product-attribute-options-and-dropdowns/
*
* Magento
*
* NOTICE OF LICENSE
*
@jsoningram
jsoningram / googlefonts.css
Created August 10, 2015 22:58
@font-face for local Google fonts
/* Lato */
@font-face {
font-family: 'Lato';
font-style: normal;
font-weight: 100;
src: local('Lato Hairline'), local('Lato-Hairline'), url(../fonts/Lato-Hairline.ttf) format('truetype');
}
@font-face {
font-family: 'Lato';
font-style: normal;
@alexgleason
alexgleason / neat-flex-grid.scss
Created February 1, 2016 04:35
Bourbon/Neat Flexbox Grid
/*
Based on code by Kevin Lamping
source: http://codepen.io/klamping/pen/waMOeX
*/
@mixin flex-grid {
display: flex;
flex-wrap: wrap;
margin-left: -$gutter;
margin-top: -$gutter;
@mrkpatchaa
mrkpatchaa / README.md
Last active October 22, 2025 07:06
Bulk delete github repos

Use this trick to bulk delete your old repos or old forks

(Inspired by https://medium.com/@icanhazedit/clean-up-unused-github-rpositories-c2549294ee45#.3hwv4nxv5)

  1. Open in a new tab all to-be-deleted github repositores (Use the mouse’s middle click or Ctrl + Click) https://github.com/username?tab=repositories

  2. Use one tab https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall to shorten them to a list.

  3. Save that list to some path

  4. The list should be in the form of “ur_username\repo_name” per line. Use regex search (Sublime text could help). Search for ' |.*' and replace by empty.