This file contains hidden or 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
for i in *.mkv; | |
do name=`echo "$i"` | |
echo "$name" | |
ffmpeg -y -i "$i" \ | |
-r 20 -s 352x288 -vb 400k \ | |
-acodec aac -strict experimental -ac 1 -ar 8000 -ab 24k \ | |
"phone/${name}.3gp" | |
done |
This file contains hidden or 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; | |
use Modules\Forum\Entities\ReplyWithThread; | |
use Spatie\Activitylog\Models\Activity as BaseActivity; | |
class Activity extends BaseActivity | |
{ | |
private $morphRelationModels = [ |
This file contains hidden or 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\Validation\Rules; | |
use Illuminate\Contracts\Validation\ImplicitRule; | |
use Illuminate\Database\Eloquent\Relations\Relation; | |
class MorphMap implements ImplicitRule | |
{ | |
public function passes($attribute, $value) |
This file contains hidden or 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 Modules\User\Traits; | |
trait HasUserMentions | |
{ | |
protected static function bootHasUserMentions() | |
{ | |
static::retrieved(function ($model) { | |
foreach (static::$mentionedAttributes as $attribute){ |
This file contains hidden or 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 App\Notifications\DatabaseChannel as CustomDatabaseChannel; | |
use Illuminate\Notifications\Channels\DatabaseChannel; | |
use Illuminate\Support\ServiceProvider; | |
class AppServiceProvider extends ServiceProvider | |
{ |
This file contains hidden or 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
FROM nginx:1.17.7 | |
COPY ./nginx.conf /etc/nginx/nginx.conf | |
RUN apt update | |
RUN apt install nodejs npm -y | |
# https://github.com/nodejs/help/issues/1877 | |
RUN npm install npm@latest -g |
This file contains hidden or 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
pid /var/run/nginx.pid; | |
load_module modules/ngx_stream_js_module.so; | |
events { | |
worker_connections 1024; | |
} | |
error_log /var/log/nginx/error.log; | |
error_log /var/log/nginx/error.log notice; |
This file contains hidden or 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
version: '3.1' | |
services: | |
php: | |
image: devilbox/php-fpm-5.3 | |
restart: always | |
ports: | |
- 9000:9000 | |
volumes: | |
- ./htdocs:/var/www/default/htdocs |
This file contains hidden or 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
Examples: | |
"Eey fo Entw, adn Eot fo Fgor, Loow fo Abt, adn Egnotu fo Dgo." == solution("Eye of Newt, and Toe of Frog, Wool of Bat, and Tongue of Dog.") |
This file contains hidden or 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 //only for Github syntax highlight | |
Layout::wrapper('wrappers.left-right', [ | |
'left' => Layout::rows([ | |
Button::make(__('Change percent')) | |
->modal('change-percent') | |
->class('btn btn-block btn-info'), | |
]), | |
'right' => Layout::rows([ | |
ModalToggle::make(__('Change amount')) | |
->modal('setPercent') |