A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
Let's say alice is a github.com user, with 2 or more private repositories repoN.
For this example we'll work with just two repositories named repo1 and repo2
https://github.com/alice/repo1
https://github.com/alice/repo2
You need to be to pull from these repositories without entering a passwords probably on a server, or on multiple servers.
#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
| document.addEventListener('touchstart', handleTouchStart, false); | |
| document.addEventListener('touchmove', handleTouchMove, false); | |
| var xDown = null; | |
| var yDown = null; | |
| function handleTouchStart(evt) { | |
| xDown = evt.touches[0].clientX; | |
| yDown = evt.touches[0].clientY; | |
| }; |
My country is under a daylight saving time period and not all my commits are made during the morning/afternoon. Because I commited after 11:00 PM - which, given the local DST, was after 00:00 AM - my 100+ days commit streak got broken - which made me very unhappy.
/**
* Validate some data.
*
* @param string|array $fields
* @param string|array $rules
* @return bool
*/
function validate($fields, $rules)
{| <style> | |
| .Alert { | |
| padding: 2em; | |
| } | |
| .Alert-Success { | |
| border: 10px solid green; | |
| } | |
| .Alert-Error { | |
| border: 10px solid red; | |
| } |
| // Mixins | |
| .has(@element; @content) { | |
| &__@{element} { | |
| @content(); | |
| } | |
| } | |
| .variant(@modifier; @content) { | |
| &--@{modifier} { | |
| @content(); |
When I heard about Brad Frost's Patternlab for the first time at beyond tellerrand I was intrigued. The idea of splitting your design work for a website into simple modules or patterns isn't new and starts to become more and more of a standard. But organizing this into a very visual styleguide/patternlab seemed to make so much sense. Brad also introduced a very interesting approach with his separation of modules into categories, such as atoms, molecules and organisms.
I started porting Brad's patternlab app to Kirby, but it never really made it to something polished and it turned out for me after using it for Kirby's panel UI, that it's actually a pain in the ass to maintain such a pattern collection.
The problem with such a styleguide or patternlab is that it exists next to the real thing. When you change something in your code base you also have to update the particular code for the pattern in patternlab. To be honest I went very quickly from being
| // foldp : (a -> state -> state) -> state -> Signal a -> Signal b | |
| var foldp = (updateFunction) => (defaultState) => (signal) => | |
| updateFunction(defaultState)(signal) | |
| const INCREMENT = 'INCREMENT' | |
| const DECREMENT = 'DECREMENT' | |
| const Actions = { | |
| increment: () => ({ type: INCREMENT }), |