Skip to content

Instantly share code, notes, and snippets.

View koomai's full-sized avatar

Sid koomai

  • Sydney, Australia
View GitHub Profile
@koomai
koomai / maintenance.php
Last active August 29, 2015 14:06
Example: List of allowed IP addresses to bypass Maintenance Mode
<?php
return [
/*
|--------------------------------------------------------------------------
| Allowed IP Addresses
|--------------------------------------------------------------------------
| Include an array of IP addresses or ranges that are allowed access to the app when
| it is in maintenance mode.
@koomai
koomai / global.php
Last active December 16, 2015 14:01
Allow array of IP addresses to bypass Laravel Maintenance Mode
App::down(function()
{
if ( ! in_array(Request::getClientIp(), ['10.0.2.2']))
{
return Response::view('maintenance', [], 503);
}
});
@koomai
koomai / PhpStorm Keyboard Shortcuts.md
Last active October 13, 2023 00:11
Frequently Used PhpStorm Keyboard Shortcuts

Note: Some of these shortcuts have been remapped for my own convenience (Preferences->Keymap). These are Mac shortcuts, just use the Windows/Linux equivalent of the Cmd/Option/Ctrl/Del keys.

####Search, Go to, Navigation ####

Cmd + P - Search file

Cmd + Shift + O - Search everywhere

(I swapped the above two recently because I use Cmd + P to search for files most of the time).

@koomai
koomai / jquery.scrollTop.animate
Created March 18, 2012 14:11
Javascript: jQuery scrollTop animate
//animates to top of page
$('html, body').animate({
scrollTop: $(".selector").offset().top
}, 2000);
@koomai
koomai / jQuery.js
Created December 23, 2011 16:14
Javascript: jQuery Open external links in new window
$(document).ready(function() {
$('a[rel="external"]').click( function() {
window.open( $(this).attr('href') );
return false;
});
});