This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Take a set of full height screenshots for a range of screensizes. | |
* phantomjs responsive-screens.js http://www.cnn.com/ png | |
* | |
* This will create a directory tree in your current directory which | |
* mirrors the URL. All files will be named with the current time. | |
* You can run this on a cron to build an archive of screenshots. | |
**/ | |
var page = new WebPage(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// set-up a connection between the client and the server | |
var socket = io.connect(); | |
// let's assume that the client page, once rendered, knows what room it wants to join | |
var room = "abc123"; | |
socket.on('connect', function() { | |
// Connected, let's sign-up for to receive messages for this room | |
socket.emit('room', room); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.headroom { | |
position: fixed; | |
top: 0; | |
-webkit-transition: top 0.15s; | |
transition: top 0.15s; | |
} | |
.headroom-hidden { | |
top: -60px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var HashTable = function() { | |
this._storage = []; | |
this._count = 0; | |
this._limit = 8; | |
} | |
HashTable.prototype.insert = function(key, value) { | |
//create an index for our storage location by passing it through our hashing function | |
var index = this.hashFunc(key, this._limit); |
Dumping ground for Links
- https://gist.github.com/cjthomp/1455c39d4a14292676ea
- https://www.agvision.ro/building-api-starter-pack-laravel/
- https://deliciousbrains.com/react-laravel-lumen-company-status-board/
- http://mguimaraes.co/creating-a-fully-testable-books-review-app-from-the-ground-with-laravel-part-1/
- http://www.programmerfort.com/php-code-optimization-tips-and-tricks/
- http://blog.pisyek.com/create-room-booking-system-laravel-fullcalendar/
#Laravel 5 Simple ACL manager
Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.
If the user has a 'Root' role, then they can perform any actions.
Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php
OlderNewer