Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block cjaoude

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
cjaoude / SanityTable.vue
Created Nov 10, 2019
selectable + transitions bootstrap-vue table
View SanityTable.vue
cjaoude / bash
Created Jan 30, 2017
Bash, made easy:
View bash

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.

cjaoude /
Last active Nov 22, 2019
chmod tutorial / cheat sheet / cheatsheet / for dummies

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

cjaoude / gist:fd9910626629b53c4d25
Last active Apr 3, 2020
Test list of Valid and Invalid Email addresses
View gist:fd9910626629b53c4d25
Use: for testing against email regex
List of Valid Email Addresses
cjaoude / snippet-laravel-all-routes
Created Jul 22, 2014
All resource routes by action, with route names. (Laravel Snippet)
View snippet-laravel-all-routes
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']);
cjaoude / laravel-all-resource-routes
Last active Aug 29, 2015
All resource routes by action, with route names. (Laravel)
View laravel-all-resource-routes
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' => '']);
Route::get('resource/{resource}', [ 'uses' => 'Controller@show' , 'as' => '']);
Route::get('resource/{resource}/edit', [ 'uses' => 'Controller@edit' , 'as' => 'resource.edit']);
cjaoude / delete custom macro
Last active Jan 7, 2016
Laravel Form custom delete macro
View delete custom macro
// 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:
Form::macro('delete', function($options){
$open = Form::open([
'route' => [ $options['route'], $options['id'] ],
View tar snippets
// '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
cjaoude / htaccess_gists.txt
Last active Aug 29, 2015
Hide .git files and folders with .htaccess
View htaccess_gists.txt
RedirectMatch 404 "(?:.*)/(?:\.git|file_or_dir)(?:/.*)?$"
You can’t perform that action at this time.