Skip to content

Instantly share code, notes, and snippets.

View pOmelchenko's full-sized avatar
🤓

Pavel Omelchenko pOmelchenko

🤓
View GitHub Profile
@pOmelchenko
pOmelchenko / gist:6fd80aa3bb273496c832
Last active December 28, 2017 14:26 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@pOmelchenko
pOmelchenko / php.ini
Created September 14, 2017 23:24
Configuring php (homestead) for the development environment
zend.assertions = 1
output_buffering = Off
@pOmelchenko
pOmelchenko / gist:7dcfa7bf1304a587156a7e26a5c2cb9f
Last active July 10, 2019 01:37
problem with mariadb (#1228)
➜ Homestead git:(master) homestead destroy -f
==> homestead: Forcing shutdown of VM...
==> homestead: Destroying VM and associated drives...
➜ Homestead git:(master) cd ..
➜ ~ rm -rf Homestead
➜ ~ git clone https://github.com/laravel/homestead.git Homestead
Клонирование в «Homestead»…
remote: Enumerating objects: 62, done.
remote: Counting objects: 100% (62/62), done.
remote: Compressing objects: 100% (37/37), done.
➜ l-application.lo git:(master) ✗ homestead ssh
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-54-generic x86_64)
Thanks for using
_ _ _
| | | | | |
| |__ ___ _ __ ___ ___ ___| |_ ___ __ _ __| |
| '_ \ / _ \| '_ ` _ \ / _ \/ __| __/ _ \/ _` |/ _` |
| | | | (_) | | | | | | __/\__ \ || __/ (_| | (_| |
|_| |_|\___/|_| |_| |_|\___||___/\__\___|\__,_|\__,_|
---
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
@pOmelchenko
pOmelchenko / tree.md
Last active April 9, 2020 11:43
sample project structure
.
├── [d]  app - код проекта, реализующий бизнеслогики
├── [d]  config - конфиги
├── [d]  database - всё что связано с базами (миграции|фабрики|фикстуры)
│   └── [d]  volume - сюда будет мапиться база из контэйнера
├── [d]  environment - дев окружение
│   ├── [d]  mysql - возможно будет как db/[субд]
│   │   ├── [d]  conf
│   │   │   └── [-]  my.cnf
<?php
declare(strict_types=0);
class Test {
private array $array;
private string $string;
public function __construct()
{
@pOmelchenko
pOmelchenko / README.md
Last active April 3, 2021 14:15
Troubleshooting CH340G issues on macOS

Troubleshooting CH340G issues on macOS

Source of article: url

The CH340G USB-to-UART chip is used by a number of inexpensive development boards (e.g. WEMOS and LOLIN branded boards) and USB-to-serial adapters. It is manufactured by a Chinese company called WinChipHead or WCH (International web site, Chinese web site). Unfortunately, it often causes problems on macOS. This guide helps you resolve any problems you might have with the boards and adapters.

img

Like many USB-to-serial solutions, it requires a driver that creates the serial port when the board or adapter is plugged into a USB port of your Mac. Starting with macOS 10.14 Mojave, macOS provides suitable drivers out of the box, implemented by Apple itself. So no additional software is needed.

# base image for install common dependencies
FROM php:8.1-fpm as base
RUN apt-get update && apt-get install --no-install-recommends -y \
&& rm -rf /var/lib/apt/lists/*
RUN mv "${PHP_INI_DIR}/php.ini-production" "${PHP_INI_DIR}/php.ini" \
&& touch "${PHP_INI_DIR}/conf.d/docker.ini" && { \
echo '[docker]'; \
} >> "${PHP_INI_DIR}/conf.d/docker.ini"
@pOmelchenko
pOmelchenko / card.shuffler.v3.shaft_0.2mm_PLA_Switchwire.gcode
Created July 26, 2023 19:03
card.shuffler.v3.shaft_0.2mm_PLA_Switchwire.gcode
This file has been truncated, but you can view the full file.
; generated by PrusaSlicer 2.6.0+MacOS-x64 on 2023-07-26 at 17:55:03 UTC
;
; thumbnail begin 64x64 6716
; iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAATcklEQVR4AbVbB3BU2ZXtAQFCDAiUUC
; sHFBBSK7UkohA5CZFzFBkGEYcwwJCGGfBgZr0U49n11thbLm/tbq3XG73l9cxYgTTknAQiSCBAEgjl
; 1N3f93z1b3+9vr/VAkzVKyR+v//fO+/cc8+9v9HpHPzp2bNnhtFolNQjPj5eio6OlsR/7+CwTJgw4c
; Xy5cuvDR48uF68PnDgwKZly5bdmDZt2mNu/ujRo8tXrVp1ZeTIkRW4l9ZzsH7du/xxdXXN4G4cHh4u
; GQyGdwHAPHTo0CoAkJ6eXiVeT0lJMWVmZpYsXrz4Bjd/yJAhtevXr78wfPjwN+09KyoqKlf3Ln9w4u