Skip to content

Instantly share code, notes, and snippets.

View Sitebase's full-sized avatar
🤘

Wim Mostmans Sitebase

🤘
View GitHub Profile
@Sitebase
Sitebase / Doctrine.php
Created February 22, 2013 13:48
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.
\Doctrine\DBAL\Types\Type::addType('uuid', 'BuboBox\Doctrine2\DBAL\Types\UuidType');
@Sitebase
Sitebase / tickets.json
Last active September 4, 2019 14:20
Test demo tickets
{
"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 September 4, 2019 01:51
Lambda auto transcode
{
"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 February 12, 2015 22:30
Detect if node app is running on Heroku
function isHeroku()
{
return process.env.NODE && ~process.env.NODE.indexOf("heroku") ? true : false;
}
@Sitebase
Sitebase / index.html
Last active July 10, 2017 11:50
Ambassify default email template
<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 November 13, 2012 13:03
PHP Worker file that restarts after crash
worker: while true; do cd /app/www/ && /app/bin/php worker.php; sleep 1; done
@Sitebase
Sitebase / test.scss
Created December 5, 2016 13:38
Test SASS file
body {
background: $color-body;
}
@Sitebase
Sitebase / LRDropboxPublish.sh
Last active August 22, 2016 13:08
Lightroom post-processing script to publish albums on Dropbox
# 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"

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:

@Sitebase
Sitebase / alert.js
Created May 12, 2016 05:29
Alert it
alert(2);