Skip to content

Instantly share code, notes, and snippets.

Govert Verschuur verschuur

Block or report user

Report or block verschuur

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 php-cli-progress-bar.php
# Shamelessly stolen from
# Remember to start $done with 1 or more, or you'll get a division by zero. 🙀
function show_status($done, $total, $size = 30)
static $start_time;
// if we go over our bound, just ignore it
if ($done > $total) {
verschuur /
Created Sep 9, 2019 — forked from xedef/
Remove all .DS_Store files (or any unwanted indexing file) from a S3 bucket, recursively

You can replace "*.DS_Store" with any other recurrent file (e.g. Desktop.ini)


Validate that you are going to delete only what you want passing the --dryrun option. I've left if by default just in case of copy/paste.

aws s3 rm s3:// --dryrun --recursive --exclude "*" --include "*.DS_Store"

View Heroku env export & import
# Instructions:
# Make sure you have the Heroku CLI installed and configured (
# Replace source-heroku-app and target-heroku-app with your app name
# 1. Export existing app’s variables to config.txt.
heroku config -s -a source-heroku-app > config.txt
# 2. Review and push to another app
cat config.txt | tr '\n' ' ' | xargs heroku config:set -a target-heroku-app
verschuur / PreventSEOIndexingHeaders.php
Created Nov 16, 2017
Laravel middleware code to add response headers to prevent SEO indexing.
View PreventSEOIndexingHeaders.php
namespace App\Http\Middleware;
use Closure;
class PreventSEOIndexingHeaders
* Handle an incoming request.
verschuur / ViewComposerServiceProvider.php
Last active Nov 16, 2017
Laravel ViewComposerServiceProvider example with several registering options
View ViewComposerServiceProvider.php
namespace App\Providers;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;
class ViewComposerServiceProvider extends ServiceProvider
verschuur / .htaccess
Created Jan 16, 2017
Handy dandy complete .htaccess
View .htaccess
# ----------------------------------------------------------------------
# | Basic rewrite settings
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
RewriteEngine On
You can’t perform that action at this time.