Skip to content

Instantly share code, notes, and snippets.

@nezaboravi
nezaboravi / ReadDuration
Created May 5, 2021 11:30
Small macro for a read duration, laravel
Str::macro('readDuration', function( ...$text) {
$totalWords = str_word_count(implode(' ', $text));
$minutesToRead = round($totalWorlds / 200);
return (int) max(1, $minutesToRead);
});
echo Str::readDuration($post->text) . ' min read';
@nezaboravi
nezaboravi / vscode-settings
Created December 4, 2020 07:28
Novi VSCODE
// Empty
@nezaboravi
nezaboravi / cloudSettings
Last active October 27, 2020 16:51
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-10-27T16:51:28.692Z","extensionVersion":"v3.4.3"}
vagrant package --base pilot-vm-300 --output admin.box --debug
INFO global: Vagrant version: 1.9.4
INFO global: Ruby version: 2.2.5
INFO global: RubyGems version: 2.4.5.1
INFO global: VAGRANT_OLD_ENV_ITERM_SESSION_ID="w0t0p0:43F1BAC7-EDA2-4AE5-A855-E5F200A3CF1E"
INFO global: VAGRANT_OLD_ENV_PAGER="less"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_OLD_ENV_ITERM_PROFILE="Default"
INFO global: VAGRANT_OLD_ENV_PWD="/Users/vladimir/Downloads/pilot-vm-300-1"
INFO global: VAGRANT_OLD_ENV__="/usr/local/bin/vagrant"
Sorry! We found the following errors (24)
URI : https://cdnjs.cloudflare.com/ajax/libs/bulma/0.4.0/css/bulma.min.css
1 Parse Error @-webkit-keyframes spinAround{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}
1 html Property text-rendering doesn't exist : optimizeLegibility
1 .is-disabled Property pointer-events doesn't exist : none
1 .is-unselectable Property user-select doesn't exist : none
1 .button Property user-select doesn't exist : none
1 .button.is-disabled, .button[disabled] Property pointer-events doesn't exist : none
1 .button.is-loading Property pointer-events doesn't exist : none
1 .input.is-disabled, .input[disabled], .textarea.is-disabled, .textarea[disabled] Property pointer-events doesn't exist : none