(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript | |
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); |
<?php | |
function runCommand () | |
{ | |
$command = 'php artisan queue:listen > /dev/null & echo $!'; | |
$number = exec($command); | |
file_put_contents(__DIR__ . '/queue.pid', $number); | |
} | |
if (file_exists(__DIR__ . '/queue.pid')) { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
<!doctype html> | |
<html> | |
<head> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
var spData = null; | |
function doData(json) { | |
spData = json.feed.entry; | |
} | |
date
in the command line. You should get something like this. Fri Oct 3 10.32:13 UTC 2014
where UTC
is your current timezone.sudo dpkg-reconfigure tzdata
and follow the instructions. Easy!date
. Now your timezone should be in this example CEST
Homestead provides an Ubuntu System and has by default only english locales installed. In PHP locales are
important if you work for example with strftime
.
Check the currently installed locales with locale -a
.
To add a new locale, you have to generate it. For example for a german locale enter sudo locale-gen de_DE.UTF-8
pure()
can be used as a higher order function or a decorator.
When passed a pure functional component, it wraps the function in a classful Component with a shouldComponentUpdate()
that ignores renders for unchanged props.
When passed a classful Component, it injects a shouldComponentUpdate()
method into the Component's prototype that ignores renders for unchanged props & state.
import pure from 'pure-component';
/* | |
This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects. | |
It will generate several classes such as: | |
.m-r-10 which gives margin-right 10 pixels. | |
.m-r-15 gives MARGIN to the RIGHT 15 pixels. | |
.m-t-15 gives MARGIN to the TOP 15 pixels and so on. | |
.p-b-5 gives PADDING to the BOTTOM of 5 pixels | |
.p-l-40 gives PADDING to the LEFT of 40 pixels |