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
/** | |
* Bootstrap CSS | |
* CSS3 Media query for responsive design | |
*/ | |
/* large grid only */ | |
@media (min-width: 1200px) { | |
} |
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
function numberToWord($number) { | |
$hyphen = '-'; | |
$conjunction = ' and '; | |
$separator = ', '; | |
$negative = 'negative '; | |
$decimal = ' point '; | |
$dictionary = array( | |
0 => 'zero', | |
1 => 'one', | |
2 => 'two', |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
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
/* | |
Exemples : | |
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}"> | |
- Or, request confirmation in the process - | |
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}" data-confirm="Are you sure?"> | |
*/ | |
(function() { | |
Laravel's document root is public
folder. But you often needs to put your assets like images on other folders than public.
Here is an example using intervestion/image
package on laravel.
Route::get('images/{name}', function($name){
if(! file_exists(storage_path("/app/$name"))){
return App::abort(404);
}
// Get the image
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
<?php | |
Route::get('/', function() { | |
return 'Hello World'; | |
}); | |
Route::get('/login', 'AuthController@loginForm'); | |
Route::post('/login', 'AuthController@postLogin'); | |
Route::delete('/logout', 'AuthController@logout'); |
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
<?php | |
namespace App\Providers; | |
use Illuminate\Routing\Router; | |
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; | |
class RouteServiceProvider extends ServiceProvider | |
{ | |
protected $webNamespace = 'App\Http\Controllers\Web'; |
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 guifont=Fira_Code:h15 " font for mac vim | |
set linespace=14 " line spacing for macvim | |
set macligatures " Fira code symbols enables | |
set guioptions-=e " Disable GUI tabs | |
" remove any scrollbar | |
set guioptions-=L | |
set guioptions-=l | |
set guioptions-=R | |
set guioptions-=r |
OlderNewer