public static function boot() {
parent::boot();
// Trim all string attributes before they are saved
static::saving(function($model){
$attributes = collect($model->getAttributes())->map(function ($attribute) {
if (is_string($attribute)) {
return trim($attribute);
}
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 any application services. | |
* | |
* @return void | |
*/ | |
public function boot() | |
{ | |
Component::macro('notify', function ($message, $title = '', $type = 'success') { | |
$this->dispatchBrowserEvent('notify', ['message' => $message, 'title' => $title, 'type' => $type]); | |
}); |
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
class CompanyView extends GetView<CompanyController> { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: Stack( | |
children: [ | |
Container( | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ |
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
Add middleware: | |
... | |
'mynova' => [ | |
'web', | |
Authenticate::class, | |
DispatchServingNovaEvent::class, | |
BootTools::class, | |
Authorize::class, | |
] |
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
{ | |
// Place your snippets for dart here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "prefix": "log", | |
// "body": [ | |
// "console.log('$1');", |
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
# Some youtube-dl shortcuts and workarounds. | |
# Download MP3 | |
alias youtube-dl-mp3="youtube-dl --extract-audio --audio-format mp3 " | |
# Youtube playlist which is organised in folders and Videos are numbered. | |
# use youtube-dl-playlist -f 22 <link> | |
alias youtube-dl-playlist='youtube-dl -o "./%(playlist_title)s/%(playlist_index)s_%(title)s.%(ext)s" ' | |
# Youtube-dl to download from hotstar. |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- The android:opacity=”opaque” line — this is critical in preventing a flash of black as your theme transitions. --> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque"> | |
<!-- The background color, preferably the same as your normal theme --> | |
<item android:drawable="@android:color/white"/> | |
<!-- Your product logo - 144dp color version of your app icon --> | |
<item> |
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
{ | |
"additional_path_items": | |
[ | |
"/usr/local/php5/bin/" | |
], | |
"auto_complete_selector": "source, text", | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Colorsublime-Themes/Facebook.tmTheme", | |
"font_face": "Fira Code", | |
"font_options": [], |
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
[ | |
"United States" => "us", | |
"Afghanistan" => "af", | |
"Albania" => "al", | |
"Algeria" => "dz", | |
"American Samoa" => "as", | |
"Andorra" => "ad", | |
"Angola" => "ad", | |
"Anguilla" => "ai", | |
"Antarctica" => "aq", |
EMOJI CHEAT SHEET
Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.
People
😄
NewerOlder