Skip to content

Instantly share code, notes, and snippets.


Dhaya dhayab

Block or report user

Report or block dhayab

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dhayab / index.html
Last active Aug 14, 2018
WebSocket Logger
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>WebSocket Logger</title>
<link rel="stylesheet" href="">
.console .log a {
dhayab /
Created Mar 24, 2018
Collection of miscellaneous scripts and files used in my old Netgear ReadyNAS Duo V2 NAS.
# Display colored FTP access and transfer log
PATTERN="User (.*): Login successful|/home/ftp/([a-z0-9\/._-\&\(\)]{1,})|FTP session closed"
sudo tail -n 100 -f /var/log/proftpd.log | egrep -i "$PATTERN" --color=auto
dhayab /
Created Oct 21, 2015
Creates a swapfile and sets specific parameters on Ubuntu-based cloud VMs.
# Info: Creates a swapfile and sets specific parameters on Ubuntu-based cloud VMs.
# Tested with Ubuntu 14.04 on DigitalOcean.
# Based on:
if [ "$EUID" -ne 0 ]
dhayab / Default (OSX).sublime-keymap
Last active Oct 21, 2015
My Sublime Text 3 preferences and key bindings.
View Default (OSX).sublime-keymap
// Change key binding to open console on non-qwerty keyboards
{ "keys": ["ctrl+&"], "command": "show_panel", "args": { "panel": "console", "toggle": true } },
// Swap lines
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
// Code folding
{ "keys": ["ctrl+shift+keypad_plus"], "command": "unfold_all" },
{ "keys": ["ctrl+shift+keypad_minus"], "command": "fold_all" },
// Fix Beginning + End of line
dhayab /
Created Mar 6, 2014 proof of my github identity

Keybase proof

I hereby claim:

  • I am dhayab on github.
  • I am dhaya ( on keybase.
  • I have a public key whose fingerprint is E849 877A ADC4 E5C6 7A41 BB74 CA98 A8F6 815E DAAE

To claim this, I am signing this object:

dhayab / filters.php
Last active Jan 25, 2016
Laravel persistent language prefixing
View filters.php
if ( in_array(Request::segment(1), Config::get('app.languages')) ) {
Session::put('locale', Request::segment(1));
} else {
return Redirect::to(Config::get('app.locale'));
if ( Session::has('locale') ) {
View gist:5967162
# Rewrite for content.
if (!-d $request_filename) {
rewrite ^/(.+)/$ /$1 permanent;
location ~* \.php$ {
dhayab / gist:5715152
Last active Dec 18, 2015 — forked from jacekd/gist:4562959
Get language prefixing in URLs from Laravel 3 back into Laravel 4.
View gist:5715152
* Multilingual URLs in Laravel 4
return array(
You can’t perform that action at this time.