This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define( 'WP_DEBUG', false ); | |
#if WP_DEBUG_LOG is enabled, you have to enable WP_DEBUG as well | |
define( 'WP_DEBUG_LOG', true ); | |
define( 'WP_DEBUG_DISPLAY', false ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT uid, title, content, datetime | |
FROM news | |
WHERE (datetime, uid) < ((SELECT datetime FROM news WHERE uid = :uid), :uid) | |
ORDER BY (datetime, uid) DESC | |
LIMIT :per_page; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE INDEX idx_datetime_uid ON news (datetime, uid); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": [ | |
{ | |
"ID": "dc4a8926-4ca5-42d7-920a-4f0de5024619", | |
"...": "..." | |
}, | |
{ | |
"ID": "2a4f316a-3fb4-4ae9-864f-38a34e50b1d5", | |
"...": "..." | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html><html><head><meta charset="utf-8"><title>CV.md</title><style>@charset "UTF-8";@import 'https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0-alpha2/katex.min.css';code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;box-shadow:none}pre{display:block;margin:0 0 10px;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}table{background-color:transparent}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th{padding:8px;line-height:1.4285714;border-top:1px solid #ddd}.table>thead>tr>td,.table>tbody>tr>th,.table>tbody>tr>td,.table>tfoot>tr>th,.table>tfoot>tr>td{padding:8px;line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
hide = update-index --assume-unchanged | |
unhide = update-index --no-assume-unchanged | |
show-hidden = !git ls-files -v | grep '^h' | cut -c3- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module "project_name" { | |
source = "git@github.com:sergeykuzmich/tfmodule-do_wordpress.git" | |
domain = "project_domain.com" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "digitalocean_domain" "default" { | |
name = "${var.domain}" | |
ip_address = "${digitalocean_droplet.default.ipv4_address}" | |
} | |
resource "digitalocean_droplet" "default" { | |
name = "${coalesce(var.droplet_name, var.domain)}" | |
image = "wordpress-18-04" | |
region = "${var.droplet_region}" | |
size = "${var.droplet_size}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data "template_file" "user_data" { | |
template = "${file("${path.module}/user_data.tpl")}" | |
vars = { | |
domain = "${var.domain}" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mv /var/www/html /var/www/html.old | |
mv /var/www/wordpress /var/www/html | |
chown -Rf www-data:www-data /var/www/html | |
sed -i "s/\$domain/${domain}/g" /etc/apache2/sites-enabled/000-default.conf | |
a2enconf block-xmlrpc | |
service apache2 restart |