Skip to content

Instantly share code, notes, and snippets.

@gubler
gubler / Version2_command_scheduler.php
Created June 3, 2018 10:34
Doctrine Migration for J-Mose/CommandSchedulerBundle
<?php
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Command Scheduler table.
*/
@gubler
gubler / event-bus-bundle.rst
Created February 22, 2018 14:19
example documentation for default register_public_methods

Event bus bundle

Using the building blocks supplied by the SimpleBus/MessageBus library you can create an event bus, which is basically a message bus, with some middlewares and a collection of message subscribers. This is described in the documentation of EventBus <Guides/event_bus>.

Using the event bus

@gubler
gubler / cat.sh
Created September 17, 2016 16:58 — forked from redoPop/cat.sh
#!/bin/sh
say -v cello i am a cat and i\'m small very small oh so small i am a cat and i\'m probably eating pancakes om nom nom nom nom nom nom om nom nom nom nom nom om nom nom nom nom nom nom nom om nom nom nom nom
#!/usr/bin/env bash
echo ">>> Installing Mailhog"
# Download binary from github
wget --quiet -O ~/mailhog https://github.com/mailhog/MailHog/releases/download/v0.2.0/MailHog_linux_amd64
# Make it executable
chmod +x ~/mailhog
@gubler
gubler / Synology-Diskstation-Git.md
Last active February 2, 2016 00:28 — forked from walkerjeffd/Synology-Diskstation-Git.md
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation
@gubler
gubler / private.xml
Created January 25, 2016 01:42 — forked from bps/private.xml
Fix modifier keys on MS Sculpt Ergonomic keyboard
<?xml version="1.0"?>
<root>
<!--
I found that remapping Cmd and Alt via the Keyboard prefs didn't
properly remap right Alt, so we'll do it here. Also map the
application key to right Alt.
-->
<devicevendordef>
<vendorname>MICROSOFT</vendorname>
<vendorid>0x045e</vendorid>
@gubler
gubler / random_string.php
Created May 14, 2013 13:17
Basic Random String function
<?php
/**
* Generates a random string from numbers, uppercase letters, and lowercase letters - good for filenames
*
* @param int $numChar length of string returned
* @return string returns string of $numChar length
*/
function randstring($numChar) {
@gubler
gubler / Bcrypt.php
Created July 22, 2011 09:50
Simple PHP 5.3+ Bcrypt class and functions
<?php
/*
By Marco Arment <me@marco.org>.
This code is released in the public domain.
THERE IS ABSOLUTELY NO WARRANTY.
Usage example:
// In a registration or password-change form: