Skip to content

Instantly share code, notes, and snippets.

View timoffmax's full-sized avatar

Tymofii Maksymenko timoffmax

View GitHub Profile
@timoffmax
timoffmax / private_fork.md
Created August 13, 2022 06:51 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@timoffmax
timoffmax / Makefile
Created January 29, 2019 06:07
Magento2 Makefile
fix-permissions-debian:
find var vendor generated pub/static pub/media app/etc -type f -exec chmod g+w {} +
find var vendor generated pub/static pub/media app/etc -type d -exec chmod g+ws {} +
chown -R :www-data .
chmod u+x bin/magento
fix-permissions-arch:
find var vendor generated pub/static pub/media app/etc -type f -exec chmod g+w {} +
find var vendor generated pub/static pub/media app/etc -type d -exec chmod g+ws {} +
chown -R :http .
@timoffmax
timoffmax / nginx.conf
Last active January 29, 2019 05:55
An example of Nginx config with PHP-FPM sockets
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
@timoffmax
timoffmax / magento
Created January 29, 2019 05:48
Magento2 Nginx config sample
server {
listen 80;
server_name magento.local;
set $MAGE_ROOT /var/www/magento2;
location ~ (index|get|static|report|404|503)\.php$ {
try_files $uri =404;
fastcgi_pass php72;
fastcgi_buffers 1024 4k;
#!/bin/bash
### Using ###
# chmod +x php_switch_console_version.sh
# sudo ./php_switch_console_version.sh 7.3
update-alternatives --set php /usr/bin/php$1
update-alternatives --set phar /usr/bin/phar$1
update-alternatives --set phar.phar /usr/bin/phar.phar$1
update-alternatives --set phpize /usr/bin/phpize$1