Skip to content

Instantly share code, notes, and snippets.

View diolektor's full-sized avatar

Vasily Komrakov diolektor

  • Sakartvelo, Tbilisi
View GitHub Profile

Принципы разработки Амплифера

Тут перечислены не законы, последние слово всегда за здравым смыслом. Тут перечислены лишь направление, куда надо стремиться. Принципы, которые должны помочь, когда не знаешь, что выбрать.

Ценности

  1. Пользователь. Если что-то сильно мешает UX или есть критическая ошибка, то в первую очередь мы спасаем пользователей. Для этого иногда надо взять ответственность на себя, переубедить толпу, написать плохой код.
@samrocketman
samrocketman / libimobiledevice_ifuse_Ubuntu.md
Last active January 11, 2024 22:47
On Ubuntu 16.04, since iOS 10 update, libimobiledevice can't connect to my iPhone. This is my attempt to document a fix.

Why this document?

I upgraded my iPhone 5s to iOS 10 and could no longer retrieve photos from it. This was unacceptable for me so I worked at achieving retrieving my photos. This document is my story (on Ubuntu 16.04).

The solution is to compile libimobiledevice and ifuse from source.

Audience

Who is this guide intended for?

@wojteklu
wojteklu / clean_code.md
Last active June 26, 2024 20:51
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active June 24, 2024 06:09
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@jonathanpmartins
jonathanpmartins / install-libsodium.sh
Last active July 28, 2019 03:14
Install Libsodium on Ubuntu 14.04.3 LTS Trusty
#!/bin/bash
sudo add-apt-repository ppa:chris-lea/libsodium;
sudo echo "deb http://ppa.launchpad.net/chris-lea/libsodium/ubuntu trusty main" >> /etc/apt/sources.list;
sudo echo "deb-src http://ppa.launchpad.net/chris-lea/libsodium/ubuntu trusty main" >> /etc/apt/sources.list;
sudo apt-get update && sudo apt-get install libsodium-dev;
@renzok
renzok / Dockerfile
Last active September 6, 2023 04:55
docker: mapping host uid and gid to user inisde container
FROM debian:jessie
ENV USER=boatswain USER_ID=1000 USER_GID=1000
# now creating user
RUN groupadd --gid "${USER_GID}" "${USER}" && \
useradd \
--uid ${USER_ID} \
--gid ${USER_GID} \
--create-home \
@greabock
greabock / ddd.md
Last active December 13, 2023 14:49
Как упороться по модульной структуре и областям ответсвенности в Laravel. А потом стать счастливым =)

#Как упороться по модульной структуре и областям ответственности в Laravel. А потом стать счастливым.

[UPD] после пары вопросов в личку, решил добавить дисклеймер: Я не считаю, что это единственно верный путь. Я просто говорю вам о том, что существует такой подход.

Когда меня спрашивают для чего нужны сервис-провайдеры в Laravel, я пожимаю плечами и говорю: если вы не знаете зачем они нужны, значит они вам не нужны. Если вы пишите и строите код так, как это описано во всех мануалах, скорее всего вам хватит одного провайдера на всё приложение, и он уже есть сразу. И не надо парить мозг себе и людям. Просто забейте на это все.

Дефолтная структура приложения на laravel выглядит вот так: У вас есть папка Http в которой лежат посредники(раньше это были фильтры) и контроллеры. Так же есть команды, хэндлеры, исключения, модели (последние Тейлор бессовестно бросил просто так - прямо в корне app )... возможно вы сами создаете папки репозиториев, обсерверов... или что-то там еще... потом вы начинаете строить

@pronskiy
pronskiy / PHP Enums.md
Last active February 10, 2019 23:22
PHP Enums - Available implementations of Enum type in PHP
@ryansechrest
ryansechrest / php-style-guide.md
Last active June 23, 2024 21:04
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
<?php
/**
* DuplicateFilter prevents Yii from exposing URLs starting with /index.php/ when showScriptName is false. Such
* URLs are automatically redirected to proper ones.
*
* To use add the following to your controller:
*
* ```php
* public function filters() {
* return array(