Skip to content

Instantly share code, notes, and snippets.

View melihovv's full-sized avatar

Alexander Melihov melihovv

  • Russia, Volgograd
View GitHub Profile
@melihovv
melihovv / focus_or_launch.sh
Created April 17, 2019 09:38
Focus or launch application on lubuntu
#!/bin/bash
# NAME: focus_or_launch
# VERSION: 0.4
# AUTHOR: (c) 2014 Glutanimate <https://github.com/Glutanimate/>
#
# DESCRIPTION: Focus existing app window or launch application if no
# window found
#
# Simplified version of a script by Henning Bekel
@melihovv
melihovv / AuthorBuilder.php
Last active January 26, 2018 15:09
Domain-Driven Design in PHP
<?php
# Example of Test Data Builder
class AuthorBuilder
{
private $username;
private $email;
private $fullName;
@melihovv
melihovv / Dockerfile
Last active January 25, 2018 01:48
Xdebug with docker
FROM ubuntu:16.04
MAINTAINER Chris Fidao
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
@melihovv
melihovv / Dockerfile
Last active January 25, 2018 08:36
Docker compose goodness (from serversforhackers.com)
FROM ubuntu:16.04
MAINTAINER Chris Fidao
RUN apt-get update \
&& apt-get install -y locales \
&& locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
@melihovv
melihovv / .tinker
Created September 9, 2017 20:24
Tinker config for laravel project with module structure
<?php
declare(strict_types = 1);
_Tinker::register(app_path('Models'));
foreach (glob(app_path('Modules/*/Models')) as $modelsPath) {
_Tinker::register($modelsPath);
}
@melihovv
melihovv / docker-compose.yml
Created August 27, 2017 23:26
Docker-compose.yml for mysql, postgres, redis, elk, etc
version: '3'
services:
mysql:
image: mysql
ports:
- 3306:3306
volumes:
- db_data:/var/lib/mysql/
- /etc/localtime:/etc/localtime:ro
- ./mysql/conf.d/:/etc/mysql/conf.d/
@melihovv
melihovv / yioop.conf
Created August 11, 2017 19:25
Nginx config for yioop
server {
listen 80 default_server;
listen [::]:80 default_server;
root /path/to/yioop;
index index.php;
server_name yioop.loc;
@melihovv
melihovv / firefox_plugin_config.php
Last active August 6, 2017 13:56
How to use Laravel Dusk with Selenium and Firefox firefox plugin config
<?php
namespace Tests;
use Facebook\WebDriver\Firefox\FirefoxProfile;
use Laravel\Dusk\TestCase as BaseTestCase;
abstract class FirefoxDuskTestCase extends BaseTestCase
{
// Some other methods
@melihovv
melihovv / site.conf.j2
Created August 5, 2017 23:25
Nginx + php-fpm configurations for ansible playbook
server {
listen 80 deferred;
server_name {{ domain }};
return 301 https://{{ domain }}$request_uri;
}
server {
listen 443 deferred ssl;
root /var/www/{{ domain }}/current/public;
@melihovv
melihovv / surfingkeys.cfg
Last active January 11, 2022 07:52
Surfingkeys
// iunmap('<Ctrl-d');
// iunmap('<Ctrl-D');
//
// mapkey('u', 'Scroll a page up', 'Normal.scroll("pageUp")');
//
// mapkey('J', 'Go one tab left', 'RUNTIME("previousTab")');
// mapkey('K', 'Go one tab right', 'RUNTIME("nextTab")');
//
// map('H', 'S');
// map('L', 'D');