Skip to content

Instantly share code, notes, and snippets.

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

Pieter Michels pierot

🏠
Working from home
View GitHub Profile
@jeroenbourgois
jeroenbourgois / titlevid.sh
Created June 9, 2021 17:49
Generate video with title screen
#!/bin/bash -e
#
# Titlevid
#
# Utility wrapper to prepend any video with a fade in
# from black and a title screen
#
# version: 0.1
# created: 08/06/2021
# last update: 08/06/2021
@paulredmond
paulredmond / ValidateMailgunWebhook.php
Created April 24, 2017 21:55
Laravel Middleware to Validate a signed Mailgun webhook
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Response;
/**
* Validate Mailgun Webhooks
* @see https://documentation.mailgun.com/user_manual.html#securing-webhooks
@jeroenbourgois
jeroenbourgois / mysql db backup script
Created February 9, 2011 21:25
Backup scripts that goes through all the mysql dbs and backups them to a backup folder, by date
#!/bin/sh
set -o errexit
nopass=0
if [ $# -eq 0 ]; then
echo "-----> No parameters passed, assuming username 'root' and empty password"
DBS=`mysql -uroot -e "show databases;"`
nopass=1
@pierot
pierot / makro_nokogiri.rb
Created January 23, 2011 14:00
Makro Resto + Fuel scraping
require 'sinatra'
require 'builder'
require 'nokogiri'
require 'uri'
require 'open-uri'
$: << File.join(File.dirname(__FILE__), '..', 'app')
configure do
set :root, File.join(File.dirname(__FILE__), '..')
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@tswicegood
tswicegood / sync_things.rb
Created October 1, 2009 20:13
Simple Ruby script to sync Basecamp and Things to-dos.
#!/usr/bin/env ruby
#
# Biggest problem with this is that it checks everything. Needs
# to be adjusted to only check N days and/or N tasks on Basecamp.
#
# Also has a problem in that Completed always wins. If you have a
# task marked at completed, then mark it as open again on just one
# side, it'll mark the other as completed if you run the sync again.
#
# All that said, it provides a basic, very rudimentary sync.