Skip to content

Instantly share code, notes, and snippets.

View VitaliyKuznetsov's full-sized avatar

Vitalii Kuznetsov VitaliyKuznetsov

  • Russia
View GitHub Profile
{
"title": "Caddy v2 autogenerated JSON schema \nhttps://github.com/abiosoft/caddy-json-schema",
"description": ": object\nhttps://pkg.go.dev/github.com/caddyserver/caddy/v2#Config\nConfig is the top (or beginning) of the Caddy configuration structure.\nCaddy config is expressed natively as a JSON document. If you prefer\nnot to work with JSON directly, there are [many config adapters](/docs/config-adapters)\navailable that can convert various inputs into Caddy JSON.\n\nMany parts of this config are extensible through the use of Caddy modules.\nFields which have a json.RawMessage type and which appear as dots (•••) in\nthe online docs can be fulfilled by modules in a certain module\nnamespace. The docs show which modules can be used in a given place.\n\nWhenever a module is used, its name must be given either inline as part of\nthe module, or as the key to the module's value. The docs will make it clear\nwhich to use.\n\nGenerally, all config settings are optional, as it is Caddy convention to\nhave good
@VitaliyKuznetsov
VitaliyKuznetsov / vga1resfix
Created January 31, 2020 04:15
Set Resolution on VGA1 output at closer available to 1366x768(60Hz) by cvt and xrandr
#!/bin/bash
# Check session type (that reasonable only with X11 sessions)
[ "$XDG_SESSION_TYPE" = x11 ] || exit 0
# Parse data from cvt output (parsing Modeline for xrand)
myNewMode=$(cvt 1366 768 60 | grep -oP 'Modeline\K.*')
myNewModeName=$(echo $myNewMode | grep -oP '"\K[^"\047]+(?=["\047])' )
myModeParams=$(echo $myNewMode | grep -oP '"\K .*$')
# Create new mode from parsed Modeline
@VitaliyKuznetsov
VitaliyKuznetsov / ubuntu_14.04_trusty-build_php5.6.2_with_zts.md
Last active November 12, 2019 21:12
Building PHP 5.6.2 with ZTS on Ubuntu 14.04 Trusty

Building PHP 5.6.2 with ZTS on Ubuntu 14.04 Trusty

1. Get dependences:

$ sudo apt-get install libfcgi-dev libfcgi0ldbl libjpeg62-dbg libmcrypt-dev libssl-dev libbz2-dev libjpeg-dev libfreetype6-dev libpng12-dev libxpm-dev libxml2-dev libpcre3-dev libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev libxpm-dev libfreetype6-dev libmysqlclient-dev libt1-dev libgd2-xpm-dev libgmp-dev libsasl2-dev libmhash-dev unixodbc-dev freetds-dev libpspell-dev libsnmp-dev libtidy-dev libxslt1-dev libmcrypt-dev libdb5.3-dev devscripts libjson-c-dev

$ sudo apt-get build-dep php5

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@VitaliyKuznetsov
VitaliyKuznetsov / debian8-apache24-php-phtreads.md
Last active February 17, 2019 17:26 — forked from Bo98/debian8-apache24-php-phtreads.md
Installing PHP Pthreads on Debian 8 Jessie with Apache 2.4

Installing PHP Pthreads on Debian 8 Jessie with Apache 2.4

What we're going to be doing

  • Replacing the installed PHP with a custom compiled version with ZTS enabled (Pthreads requires it).
  • Adding the Pthreads extension through PECL.

Method