Skip to content

Instantly share code, notes, and snippets.

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"=""
@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
@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 / 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 / gist:28faa641acd6135d26dc
Created November 26, 2015 15:58 — forked from adamjimenez/gist:5917897
Generate thumbnails from video files using HTML5's video tag and canvas
<?php
//where you want your thumbnails to go
$thumbs_dir = 'uploads/thumbs/';
//this should be an array of video paths
$videos = array();
if( $_POST["name"] ){
// Grab the MIME type and the data with a regex for convenience
if (!preg_match('/data:([^;]*);base64,(.*)/', $_POST['data'], $matches)) {
@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 / 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 / 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 / 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 / .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"