Skip to content

Instantly share code, notes, and snippets.

View romanoffs's full-sized avatar
🎯
Focusing

Денис romanoffs

🎯
Focusing
View GitHub Profile
@romanoffs
romanoffs / Nginx_S3_Proxy_with_caching.conf
Created January 30, 2019 15:30 — forked from mikhailov/gist:9639593
Nginx S3 Proxy with caching
events {
worker_connections 1024;
}
http {
default_type text/html;
access_log /dev/stdout;
sendfile on;
keepalive_timeout 65;
@romanoffs
romanoffs / fix-wordpress-permissions.sh
Created January 29, 2019 10:33 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@romanoffs
romanoffs / .htaccess
Created September 5, 2018 12:57 — forked from Zodiac1978/.htaccess
Safer WordPress with these .htaccess additions
# Don't show errors which contain full path diclosure (FPD)
# Use that line only if PHP is installed as a module and not per CGI
# try using a php.ini in that case.
# Change mod_php5.c to mod_php7.c if you are running PHP7
<IfModule mod_php5.c>
php_flag display_errors Off
</IfModule>
# Don't list directories
<IfModule mod_autoindex.c>
@romanoffs
romanoffs / README.md
Created September 4, 2018 14:03 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@romanoffs
romanoffs / nginx.default.conf
Created August 23, 2018 12:25 — forked from sumardi/nginx.default.conf
Install PHP-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and PHP-FPM
sudo yum install -y nginx php-fpm
# Install PHP extensions
sudo yum install -y php-devel php-mysql php-pdo \
php-pear php-mbstring php-cli php-odbc \
@romanoffs
romanoffs / gist:76414c57530338f83468e7e4d5b2e7a3
Created August 11, 2018 19:04 — forked from Neolot/gist:3964380
PHP Склонение числительных
<?php
/**
* Функция склонения числительных в русском языке
*
* @param int $number Число которое нужно просклонять
* @param array $titles Массив слов для склонения
* @return string
**/
$titles = array('котик', 'котика', 'котиков');
function declOfNum($number, $titles)
@romanoffs
romanoffs / CanActivate.dart
Created July 14, 2018 20:09 — forked from kulshekhar/CanActivate.dart
AngularDart sample using CanActivate
import 'dart:html';
import 'package:angular2/core.dart';
import 'package:angular2/router.dart';
@Component(
selector: 'my-app',
styleUrls: const ['app_component.css'],
template: '''
<h1>My First Angular 2 App</h1>