Skip to content

Instantly share code, notes, and snippets.

🇦🇶
Antarctic Bear

Anton Komarev antonkomarev

🇦🇶
Antarctic Bear
Block or report user

Report or block antonkomarev

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
@antonkomarev
antonkomarev / ffmpeg-html5
Created Dec 12, 2017 — forked from yellowled/ffmpeg-html5
Convert videos to proper formats for HTML5 video on Linux shell using ffmpeg. Will probably convert this to a bash script later, but for the time being, here's some examples. Not sure there have actually sensible dimensions and bitrates for web video.
View ffmpeg-html5
# webm
ffmpeg -i IN -f webm -vcodec libvpx -acodec libvorbis -ab 128000 -crf 22 -s 640x360 OUT.webm
# mp4
ffmpeg -i IN -acodec aac -strict experimental -ac 2 -ab 128k -vcodec libx264 -vpre slow -f mp4 -crf 22 -s 640x360 OUT.mp4
# ogg (if you want to support older Firefox)
ffmpeg2theora IN -o OUT.ogv -x 640 -y 360 --videoquality 5 --audioquality 0 --frontend
@antonkomarev
antonkomarev / CssActiveClassComposer.php
Last active Apr 8, 2017
Laravel CSS Active Class View Composer
View CssActiveClassComposer.php
<?php
namespace App\ViewComposers;
use Illuminate\View\View;
use Illuminate\Support\Str;
use Illuminate\Http\Request;
class CssActiveClassComposer
{
@antonkomarev
antonkomarev / CountrySeeder.php
Last active Jan 19, 2017
Laravel dictionary seeders
View CountrySeeder.php
<?php
use Illuminate\Database\Seeder;
class CountrySeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
View CourseOpener.php
<?php
namespace App\Domain\Courses;
use App\Domain\Courses\Exam\ExamQuestion;
use App\Domain\Courses\Exam\ExamVersion;
use App\Exceptions\Courses\CourseCannotBeOpened;
class CourseOpener
{
View RealtimeGridVuexLaravel.md

Real-time Grid Component with Laravel, Vue.js, Vuex & Socket.io (Google Docs-like Functionality)

Motivation

The exercise of writing this tutorial -- as well as recording it as a screencast -- has helped me better understand the concepts behind a couple of my favorite open source tools. Both the tutorial and screencast will be of personal use in the future as references. If they are of help to others, that will be great too.

I love Google Docs' real-time, multi-user interactive capability, and I've have always been a fan of spreadsheets. I wanted to see if I could replicate that type of functionality. What I've done is taken the basic Vue.js Grid Component example and altered it a bit so that when a user clicks on a cell, that cell becomes highlighted or "active", not just in the user's browser but in any browser instance cur

View contenttools-background-image.coffee
# Example integration of a background-image uploader
# Author: Guillaume Piot
# Email: guillaume@cotidia.com
# Company: Cotidia Ltd
# Licence: MIT
#
# The div holder is absolute positioned within the parent div
#
# <div class="[ article__image ] [ article-image ] [ editable ] [ parallax ]" data-name="article_image">
# <div
@antonkomarev
antonkomarev / gist:907667d2aa3c972b6b7d290664290ac6
Created Aug 22, 2016
Call Laravel artisan without memory limit
View gist:907667d2aa3c972b6b7d290664290ac6
php -d memory_limit=8000M artisan migrate:refresh --seed
@antonkomarev
antonkomarev / gist:7a0c9367695babf76b78930f67f6ad05
Created Apr 16, 2016 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
View gist:7a0c9367695babf76b78930f67f6ad05
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@antonkomarev
antonkomarev / style.css
Last active Aug 28, 2015 — forked from marcelotk15/style.css
Style to https://github.com/cmgmyr/laravel-messenger with differentiate senders and receiver.
View style.css
.mensagens-chat
{
list-style: none;
margin: 0;
padding: 0;
}
.mensagens-chat li
{
margin-bottom: 10px;
View DB Design performance tips and tricks.md

DB Design performance tips and tricks


  • Learn from smarties
  • Evangelize good DB design (which in turn helps you solidify your own knowledge)
  • Talk to business people
  • Benchmark your queries to determine the fastest

You can’t perform that action at this time.