Skip to content

Instantly share code, notes, and snippets.

@bonsi
bonsi / keybase.md
Last active January 27, 2017 19:34

Keybase proof

I hereby claim:

  • I am bonsi on github.
  • I am bonsi (https://keybase.io/bonsi) on keybase.
  • I have a public key whose fingerprint is 7169 3C20 9FEA 2122 66B6 D5D7 C72D AE9B D6EB A3A8

To claim this, I am signing this object:

@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
@bonsi
bonsi / gnome-terminal-settings
Created November 23, 2016 16:03
gnome-terminal settings (Ubuntu 16.04.1 LTS)
[/]
new-terminal-mode='tab'
schema-version=uint32 3
[keybindings]
switch-to-tab-1='disabled'
switch-to-tab-2='disabled'
switch-to-tab-3='disabled'
new-tab='<Primary>t'
switch-to-tab-4='disabled'
@bonsi
bonsi / Makefile
Created November 26, 2016 11:28
Makefile - more enjoyable (shorter) docker management commands
# work in progress. inspired by serverforhackers example.
.PHONY: up down log tinker artisan test
# Set dir of Makefile to a variable to use later
MAKEPATH := $(abspath $(lastword $(MAKEFILE_LIST)))
PWD := $(dir $(MAKEPATH))
up:
docker-compose -f laradock/docker-compose.yml up -d
@bonsi
bonsi / laravel-elixir-growl-docker.md
Last active December 2, 2016 16:49
Laravel elixir remote growling from within a docker container

Laravel elixir 6 remote notifications (Growl) from within a docker container.

In /node_modules/laravel-elixir/dist/Notification.js

Replace

var _gulpNotify = require('gulp-notify');
@bonsi
bonsi / laravel-dusk-docker.md
Last active January 21, 2022 05:34
Get Laravel Dusk running within (lara)dock

NOTES

Working solution for laradock

  • spin up the selenium image (selenium/standalone-chrome) as included with laradock
  • in .env.dusk.local set APP_URL=http://nginx to point to the docker nginx image
  • in tests\DuskTestCase.php replace the line 'http://localhost:9515', DesiredCapabilities::chrome() with 'http://selenium:4444/wd/hub', DesiredCapabilities::chrome()
  • run php artisan dusk
  • ...
  • PROFIT
@bonsi
bonsi / git.md
Last active February 15, 2017 07:42
Git commands

Branches

How to check out a remote Git branch

git fetch
git checkout test

Forks

How to contribute to an open-source GitHub project using your own fork

  • Fork the repo
Windows Registry Editor Version 5.00
; Created by: Shawn Brink
; Created on: March 5th 2017
; Tutorial: https://www.tenforums.com/tutorials/78681-file-hash-context-menu-add-windows-8-windows-10-a.html
[HKEY_CLASSES_ROOT\*\shell\hash]
"MUIVerb"="Hash"
"SubCommands"=""
c68adc5dc8d9b3a7cc880ddea27b5a23