Skip to content

Instantly share code, notes, and snippets.

Avatar

Wim Mostmans Sitebase

View GitHub Profile
@Sitebase
Sitebase / Doctrine.php
Created Feb 22, 2013
Custom doctrine type to store uuid's as binary(16) values in a MySQL database. Set the column type that you want to use as BINARY(16) in MySQL and your good to go.
View Doctrine.php
\Doctrine\DBAL\Types\Type::addType('uuid', 'BuboBox\Doctrine2\DBAL\Types\UuidType');
@Sitebase
Sitebase / tickets.json
Last active Sep 4, 2019
Test demo tickets
View tickets.json
{
"results": [
{
"objectId": 245,
"title": "API-22: APIs working too fast",
"link": "http://example.com/1",
"created": "2016-09-15",
"priority": "HIGH",
"project": "API",
"reported_by": "msmith@hubspot.com",
@Sitebase
Sitebase / data.json
Last active Sep 4, 2019
Lambda auto transcode
View data.json
{
"Records": [
{
"eventVersion": "2.0",
"eventSource": "aws:s3",
"awsRegion": "us-east-1",
"eventTime": "1970-01-01T00:00:00.000Z",
"eventName": "ObjectCreated:Put",
"userIdentity": {
"principalId": "EXAMPLE"
@Sitebase
Sitebase / heroku.js
Created Feb 12, 2015
Detect if node app is running on Heroku
View heroku.js
function isHeroku()
{
return process.env.NODE && ~process.env.NODE.indexOf("heroku") ? true : false;
}
@Sitebase
Sitebase / index.html
Last active Jul 10, 2017
Ambassify default email template
View index.html
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta charset="utf-8"> <!-- utf-8 works for most cases -->
<meta name="viewport" content="width=device-width"> <!-- Forcing initial-scale shouldn't be necessary -->
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- Use the latest (edge) version of IE rendering engine -->
<meta name="x-apple-disable-message-reformatting"> <!-- Disable auto-scale in iOS 10 Mail entirely -->
<title></title> <!-- The title tag shows in email notifications, like Android 4.4. -->
<!-- Web Font / @font-face : BEGIN -->
<!-- NOTE: If web fonts are not required, lines 10 - 27 can be safely removed. -->
@Sitebase
Sitebase / Procfile
Created Nov 13, 2012
PHP Worker file that restarts after crash
View Procfile
worker: while true; do cd /app/www/ && /app/bin/php worker.php; sleep 1; done
View test.scss
body {
background: $color-body;
}
@Sitebase
Sitebase / LRDropboxPublish.sh
Last active Aug 22, 2016
Lightroom post-processing script to publish albums on Dropbox
View LRDropboxPublish.sh
# Script that can be used a post-processing script in lightroom export dialog
# It will auto move all file to your dropbox and use specific parts of the
# filename to create sub folders
# Example: 201009 - India-DSC_3493.jpg
# will be moved to the EXPORT_ROOT/2010 - India/DSC_3493.jpg
DROPBOX_ROOT=$(cat ~/.dropbox/info.json | python -c 'import sys, json; print json.load(sys.stdin)["personal"]["path"]')
EXPORT_ROOT="$DROPBOX_ROOT/Photos/Albums"
LOGFILE="$EXPORT_ROOT/lightroom-export.log"
View keybase.md

Keybase proof

I hereby claim:

  • I am sitebase on github.
  • I am sitebase (https://keybase.io/sitebase) on keybase.
  • I have a public key whose fingerprint is 6084 694D D6F5 B8AD C85E 7150 2FD7 DED9 8FA5 E27A

To claim this, I am signing this object: