Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |
| git config --global alias.superlog "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all" |
| // route: route must go through 'web' middleware | |
| Route::group(['middleware' => ['web']], function () { | |
| Route::resource('post', 'PostsController'); | |
| }); | |
| // view: href link with token | |
| <a href="{{ action('PostsController@destroy', ['id'=>$post->id]) }}" | |
| data-token="{{ csrf_token() }}" | |
| data-id="{{ $post->id }}" | |
| class="delete-post-link" |
| $.on('click','.dinamic .add',function(e){ | |
| /* Elementos dinamicos. Solo es necesario agregar las clases dinamic, add y remove, | |
| como se muestra en el ejemplo a continuacion: | |
| <div class="dinamic">(contenedor) | |
| <div>(elemento inicial) | |
| <input/> | |
| <button type="button" class="add">agregar</button> | |
| </div> | |
| <script class="template" type="text/x-jquery-tmpl">(plantilla de nuevo elemento) | |
| <div> |
Some useful commands and scripts for MySQL.
Update: All these commands and more at https://github.com/joseluisq/awesome-mysql-queries-commands
mysql -h host -u username -p password --default_character_set utf8 database_name < mysql_script.sql| var slack = require('slack'); | |
| var bot = slack.rtm.client(); | |
| var token = "your_slack_token"; | |
| bot.team_join(function(obj) { | |
| console.log("Team join triggered"); | |
| slack.chat.postMessage( | |
| { | |
| token: token, | |
| channel: obj.user.id, |
| <?php // /app/Http/Middleware/Cors.php | |
| namespace App\Http\Middleware; | |
| use Closure; | |
| class Cors { | |
| public function handle($request, Closure $next) | |
| { | |
| return $next($request) |
Current version: 1.0.19 1.0.15 (as of 2018-12-10)