Skip to content

Instantly share code, notes, and snippets.

Jeroen Vermeulen jeroenvermeulen

Block or report user

Report or block jeroenvermeulen

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
View .git__hooks__pre-commit
#!/usr/bin/python
"""
File: .git/hooks/pre-commit
Referencing current branch in github README.md[1]
This pre-commit hook[2] updates the README.md file's
Travis badge with the current branch. Gist at[4].
[1] http://stackoverflow.com/questions/18673694/referencing-current-branch-in-github-readme-md
@jeroenvermeulen
jeroenvermeulen / lndupes.py
Last active Jul 5, 2018 — forked from filipenf/lndupes.py
Reads fdupes(-r1) output and create relative symbolic links for each duplicate
View lndupes.py
#!/usr/bin/env python
# source: https://gist.github.com/filipenf/e9901883d66b8da65c151cf674e5f2a9
#
# Reads fdupes(-r -1) output and create relative symbolic links for each duplicate
# usage: fdupes -r1 . | ./lndupes.py
import os
from os.path import dirname, relpath, basename, join
import sys
import shlex
View magehost_php7_fix.sh
#
# Copyright 2017 MageHost.pro
#
cd ~/httpdocs
test -d .git && { git add -A; git commit -a -m 'Uncommitted changes on server'; }
test -d .modman || modman init
modman clone --copy --force https://github.com/Inchoo/Inchoo_PHP7 -b 1.9.2.4
n98-magerun.phar cache:clean
test -d .git && { git add -A; git commit -a -m 'Installed Inchoo_PHP7 via modman'; }
wget https://gist.githubusercontent.com/renttek/29beaaa1e90909639501/raw/be5df0b33b72cdc2ab037d374802c53ccba066df/0001-BUGIFX-Magento-Zend-Framework-1-PHP5.6.patch
@jeroenvermeulen
jeroenvermeulen / find_cacheable_false.sh
Last active Aug 28, 2019
Magento2: Find cacheable="false" in layout XML
View find_cacheable_false.sh
#### by MageHost.pro ####
# execute in Magento 2 root:
find vendor app -regextype 'egrep' -type f -regex '.*/layout/.*\.xml' -not -regex '.*(vendor/magento/|/checkout_|/catalogsearch_result_|/dotmailer).*' | xargs grep --color -n -e 'cacheable="false"'
@jeroenvermeulen
jeroenvermeulen / convertImages.sh
Last active Aug 17, 2017 — forked from peterjaap/convertImages.sh
Convert images to smaller size and lower quality to reduce file sizes for Magento's original product photos
View convertImages.sh
#!/bin/bash
# convertImages.sh
# Authors: Peter Jaap Blaakmeer (elgentos.nl) & Jeroen Vermeulen (magehost.pro)
# https://gist.github.com/peterjaap/7080989
# https://gist.github.com/jeroenvermeulen/feb819799dea3d74ae9c
NEWQUALITY=90
NEWWIDTH=2000
DIRECTORY=$HOME/httpdocs/media/catalog/product/
View Magento_Hosting_Benchmark_Results.txt
#### Magento Hosting Performance Benchmarks
#### Executed by: JeroenVermeulen.eu / MagentoHosting.pro
## Example test command for 5 concurrent users hitting as fast as possible:
## siege --concurrent=5 --file=urls.txt --log=log.txt --time=60s --quiet --benchmark --internet
## The file urls.txt contains 5029 URLs based on sitemap.xml.
## Magento contains 5933 Total products.
## Magento has 4697 Enabled products.
##
@jeroenvermeulen
jeroenvermeulen / jv_clean_product_images.php
Last active Sep 11, 2019
Script to clean up unused Magento images
View jv_clean_product_images.php
#!/usr/bin/php
<?php
/**
* jv_clean_product_images.php
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
You can’t perform that action at this time.