Skip to content

Instantly share code, notes, and snippets.

@alpiua
alpiua / gist:ce69751d1403b07f53c6
Last active September 10, 2015 23:05 — forked from karmazzin/gist:5690763
Настройка php-fpm, nginx на vps
В этом мануале мы попробуем настроить связку nginx и php-fpm, так чтобы она могла работать на бесплатном тарифе. В уме мы держим, что в результате на этом сервере будет бежать drupal (весьма требовательный к ресурсам движок), но настройки подойдут и для массы других cms.
Надо сказать, что львиная доля этого how-to — это перепечатка (естественно с согласия авторов) статьи на [url=http://nixclub.pro/node/31]nixclub.pro[/url] Евгения Верещагина и Александра Кубашина, поскольку они написали, ну буквально про нас и написали хорошо.
Перед началом рекомендуем минимально настроить сервер с помощью [url=http://forum.serverscamp.com/viewtopic.php?f=14&t=202]этого[/url] руководства.
Далее текст перепечатки:
0.0 Введение (или зачем эта статья)
server {
listen 80;
server_name www.example.com;
rewrite ^ http://example.com$request_uri? permanent; #301 redirect
}
server {
listen 80;
server_name example.com;
@alpiua
alpiua / server.cfg
Created January 27, 2016 16:04 — forked from ozh/server.cfg
Quakelive Server Config
// Servers have the ability to run multiple gametypes, known as "factories." You should not add gameplay related
// cvars in the server config: they may get overwritten by the factory. For creating your own sets of gameplay rules,
// create a file ending in ".factories" inside baseq3/scripts, and refer to "Creating custom gametypes" in the
// server_readme.txt file.
// Be aware that factories can override any cvar, including ones specified in this config file.
set sv_hostname "SARL | CA | elo+stats | GLHF"
set sv_tags "clanarena, qlstats.net, ELO, SARL, no-whiners, glhf" // Comma delimited field of server tags to show in server browser.
@alpiua
alpiua / nginx.conf
Created July 19, 2016 08:21 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@alpiua
alpiua / gdrive_download
Last active June 6, 2018 21:11 — forked from darencard/gdrive_download
Script to download files from Google Drive using Bash
#!/usr/bin/env bash
# gdrive_download
#
# script to download Google Drive files from command line
# not guaranteed to work indefinitely
# taken from Stack Overflow answer:
# http://stackoverflow.com/a/38937732/7002068
gURL=$1
@alpiua
alpiua / brightness.sh
Created August 28, 2020 00:34 — forked from andreafortuna/brightness.sh
Simple script to modify screen brightness
#!/bin/bash
# Simple script to modify screen brightness
# USAGE:
# brightness.sh +20 (Increase brightness by 20%)
basedir="/sys/class/backlight/"
# get the backlight handler
handler=$basedir$(ls $basedir)"/"
@alpiua
alpiua / cloudflare-delete-all-records.sh
Created April 7, 2022 21:19 — forked from slayer/cloudflare-delete-all-records.sh
Delete all DNS records for specified zone
#!/bin/bash
TOKEN="xxxxxxxxxxxxxxxxxxx"
ZONE_ID=2222222222222222222222222
# EMAIL=me@gmail.com
# KEY=11111111111111111111111111
# Replace with
# -H "X-Auth-Email: ${EMAIL}" \
# -H "X-Auth-Key: ${KEY}" \