Run commands, by condition:
A; B Run A and then B, regardless of success of A
A && B Run B if A succeeded
A || B Run B if A failed
A & Run A in background.
<template> | |
<div> | |
<b-table | |
id="table-transition-example" | |
:items="items" | |
:fields="fields" | |
striped | |
small | |
primary-key="a" | |
selectable |
Run commands, by condition:
A; B Run A and then B, regardless of success of A
A && B Run B if A succeeded
A || B Run B if A failed
A & Run A in background.
chmod
Forget the chmod octals (the numbers). Set permission the easy way using the keywords
// know the ownerships:
u = User (you)
g = Group
o = Other (aka. 'World')
a = All of the above
Use: for testing against email regex | |
ref: http://codefool.tumblr.com/post/15288874550/list-of-valid-and-invalid-email-addresses | |
List of Valid Email Addresses | |
email@example.com | |
firstname.lastname@example.com | |
email@subdomain.example.com | |
firstname+lastname@example.com |
<snippet> | |
<content><![CDATA[ | |
Route::get('${1:resource}', [ 'uses' => '${3:Controller}@index', 'as' => '${1:resource}.index']); | |
Route::get('${1:resource}/create', [ 'uses' => '${3:Controller}@create' , 'as' => '${1:resource}.create']); | |
Route::post('${1:resource}', [ 'uses' => '${3:Controller}@store', 'as' => '${1:resource}.store']); | |
Route::get('${1:resource}/{${2:resource}}', [ 'uses' => '${3:Controller}@show' , 'as' => '${1:resource}.show']); |
Route::get('resource', [ 'uses' => 'Controller@index', 'as' => 'resource.index']); | |
Route::get('resource/create', [ 'uses' => 'Controller@create' , 'as' => 'resource.create']); | |
Route::post('resource', [ 'uses' => 'Controller@store', 'as' => 'resource.store']); | |
Route::get('resource/{resource}', [ 'uses' => 'Controller@show' , 'as' => 'resource.show']); | |
Route::get('resource/{resource}/edit', [ 'uses' => 'Controller@edit' , 'as' => 'resource.edit']); |
// Create a 'delete' form in a single line. This Laravel form macro is a shortcut that | |
// creates a form with a DELETE method and a 'Delete' button. This macro saves you | |
// the trouble of creating a form each time you need to make a delete route. | |
// Place this code in a app/macros.php file and require this file in global.php | |
// ref: http://laravel.com/docs/html#custom-macros | |
Form::macro('delete', function($options){ | |
$open = Form::open([ | |
'route' => [ $options['route'], $options['id'] ], |
// 'cuz the last thing anyone should need is to learn tar | |
// the trick to tar is, the -f flag needs to be the last option enumerated | |
// compress and archive folder | file | |
tar -zcf archive_name.tar.gz directory/file | |
// decompress archive | |
tar -zxf file.tar.gz |
RedirectMatch 404 "(?:.*)/(?:\.git|file_or_dir)(?:/.*)?$" |