Skip to content

Instantly share code, notes, and snippets.

@bonsi
bonsi / Vagrantfile
Created June 23, 2015 09:31
Vagrant - Debian / MySQL / Dotdeb / PHP bootstrap
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "chef/debian-7.4"
config.vm.box_url = "https://vagrantcloud.com/chef/boxes/debian-7.4/versions/1/providers/virtualbox.box"
config.vm.network :private_network, ip: "192.168.56.10"
@bonsi
bonsi / Vagrantfile
Last active August 29, 2015 14:23
WorkInProgess - Vagrant - Debian Jessie / Apache2 / Git
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
config.vm.box = "spoof/debian-jessie64"
@bonsi
bonsi / gist:8950e0820ec88eb5d87f
Last active August 29, 2015 14:24
Gulpfile with remote GNTP notifications (currently using localhost + ssh tunnel back to host + Growl for Windows)
var gulp = require('gulp');
var phpspec = require('gulp-phpspec');
var run = require('gulp-run');
var notify = require('gulp-notify');
var nn = require('node-notifier');
var customNotifier = notify.withReporter(function (options, callback) {
new nn.Growl().notify(options, callback);
});
if [ -f /etc/bash_completion ]; then
source /etc/bash_completion
fi
__has_parent_dir () {
# Utility function so we can test for things like .git/.hg without firing up a
# separate process
test -d "$1" && return 0;
current="."
@bonsi
bonsi / Git push deployment in 7 easy steps.md
Created October 26, 2015 10:16 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@bonsi
bonsi / virtualbox_vagrant_home.bat
Last active December 21, 2015 10:47 — forked from michaelklapper/virtualbox_vagrant_home.bat
Reconfigure VirtualBox and Vagrant home directory for Windows
REM # VirtualBox home directory.
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" setproperty machinefolder "X:\VirtualMachines\virtualboxImages"
REM # Vagrant home directory for downloadad boxes.
REM REG ADD HKCU\Environment /v VAGRANT_HOME /t REG_SZ /d "X:\VirtualMachines\VAGRANT_HOME"
REM - this will only set the env var for the current session. Use setx to persist it.
set VAGRANT_HOME=X:\VirtualMachines\VAGRANT_HOME
REM #########################################################################################
vagrant up
pause
@bonsi
bonsi / .bash_profile
Created January 5, 2016 10:05 — forked from JeffreyWay/.bash_profile
Prettier git logs
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@bonsi
bonsi / custom-solarized-dark.reg
Created January 10, 2016 16:06
Custom putty session color & font settings, based on https://github.com/altercation/solarized
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Solarized%20Dark%20Ivo]
"Present"=dword:00000001
"HostName"=""
"LogFileName"="putty.log"
"LogType"=dword:00000000
"LogFileClash"=dword:ffffffff
"LogFlush"=dword:00000001
"SSHLogOmitPasswords"=dword:00000001
@bonsi
bonsi / NewMessage.php
Created October 11, 2016 14:33 — forked from sebastiaanluca/NewMessage.php
Laravel + Redis + NodeJS + Socket.io pub/sub secure server and client supporting multiple rooms, channels, users, … Add `client.js` to your client app, run `node server.js`, and trigger the Laravel event any way you want to broadcast the data.
<?php
namespace App\Events;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use Illuminate\Queue\SerializesModels;
class NewMessage extends Event implements ShouldBroadcast
{
@bonsi
bonsi / ssl-config
Created November 14, 2016 13:26 — forked from ivanleoncz/ssl-config
Generates self-signed SSL certificates.
[ req ]
default_bits = 2048
distinguished_name = req_distinguished_name
attributes = req_attributes
prompt = no
[ req_distinguished_name ]
C = MX
ST = VE
L = XL