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
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
APP_NAME=vmagent make app-via-docker
make[1]: Entering directory '/root/VictoriaMetrics-1.39.1'
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
@alpiua
alpiua / LOG
Created August 27, 2020 12:09
vector can't clear buffer on suse 42.2
2020/08/27-14:44:28.158013 7ffbe4b9b880 Delete type=3 #1
2020/08/27-14:44:28.240346 7ffbcabff700 Level-0 table #5: started
2020/08/27-14:44:28.247970 7ffbcabff700 Level-0 table #5: 7599 bytes OK
2020/08/27-14:44:28.255075 7ffbcabff700 Delete type=0 #3
2020/08/27-14:44:28.255987 7ffbcabff700 Manual compaction at level-0 from '\x00\x00\x00\x00\x00\x00\x00\x00' @ 72057594037927935 : 1 .. '\x00\x00\x00\x00\x00\x00\x00\x0a' @ 0 : 0; will stop at (end)
2020/08/27-14:45:03.027120 7ffbcabff700 Level-0 table #7: started
2020/08/27-14:45:03.211702 7ffbcabff700 Level-0 table #7: 3831761 bytes OK
2020/08/27-14:45:03.217723 7ffbcabff700 Delete type=0 #4
2020/08/27-14:45:04.816140 7ffbcabff700 Level-0 table #9: started
2020/08/27-14:45:04.966877 7ffbcabff700 Level-0 table #9: 3831008 bytes OK
@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 / gist:31c95a5f71be6bbe6ba3b91866d35dbd
Created December 8, 2021 02:12
rotate touch screen with external monitors
#!/bin/sh
function map_to_display(){
xinput map-to-output "Wacom Pen and multitouch sensor Finger touch" $1
xinput map-to-output "Wacom Pen and multitouch sensor Pen stylus" $1
xinput map-to-output "Wacom Pen and multitouch sensor Pen eraser" $1
}
function rotate_touch(){
xinput set-prop "Wacom Pen and multitouch sensor Finger touch" "Wacom Rotation" $1
@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}" \