This guide shows howto install Apache HTTP Server (httpd) with PHP 5.5.9 and following modules on Fedora 20/19/18/17, CentOS 6.5/6.4/6.3/6.2/6.1/6/5.10 and Red Hat (RHEL) 6.5/6.4/6.3/6.2/6.1/6/5.10 systems.
- Change root user
su -
## OR ##
sudo -i
import requests | |
def test_home(): | |
"GET request to url returns a 200" | |
url = 'https://public.ebc.com.br/templates/v1/css/print.css' | |
resp = requests.get(url) | |
assert resp.status_code == 200 | |
def test_http_to_https_redirect(): |
# https://stackoverflow.com/a/31087016 | |
# To convert a complete directory tree recursively from iso-8859-1 to utf-8 including the creation of subdirectories none of the short solutions above worked for me because the directory structure was not created in the target. Based on Dennis Williamsons answer I came up with the following solution: | |
find . -type f -exec bash -c 't="/tmp/dest"; mkdir -p "$t/`dirname {}`"; iconv -f iso-8859-1 -t utf-8 "{}" > "$t/{}"' \; | |
# It will create a clone of the current directory subtree in /tmp/dest (adjust to your needs) including all subdirectories and with all iso-8859-1 files converted to utf-8. |
<div class="some-div"> | |
<img class="imgHeading" src="path-to-file.jpg"> | |
</div> |
{ | |
"bold_folder_labels": true, | |
"caret_style": "wide", | |
"default_line_ending": "unix", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"fade_fold_buttons": false, | |
"fallback_encoding": "UTF-8", | |
"find_selected_text": true, | |
"font_options": |
backend default { | |
.host = "127.0.0.1"; | |
.port = "81"; | |
} | |
sub vcl_recv { | |
if (req.url ~ "^/robots.txt$") { | |
error 702 "OK"; | |
} | |
if (req.url ~ "^/googlef0861ad1078d73db.html$") { |
This guide shows howto install Apache HTTP Server (httpd) with PHP 5.5.9 and following modules on Fedora 20/19/18/17, CentOS 6.5/6.4/6.3/6.2/6.1/6/5.10 and Red Hat (RHEL) 6.5/6.4/6.3/6.2/6.1/6/5.10 systems.
su -
## OR ##
sudo -i
# dump all databases once every 24 hours | |
45 4 * * * root nice -n 19 su - postgres -c "pg_dumpall --clean" | gzip -9 > /var/local/backup/postgres/postgres_all.sql.gz | |
# vacuum all databases every night (full vacuum on Sunday night, lazy vacuum every other night) | |
45 3 * * 0 root nice -n 19 su - postgres -c "vacuumdb --all --full --analyze" | |
45 3 * * 1-6 root nice -n 19 su - postgres -c "vacuumdb --all --analyze --quiet" | |
# re-index all databases once a week | |
0 3 * * 0 root nice -n 19 su - postgres -c 'psql -t -c "select datname from pg_database order by datname;" | xargs -n 1 -I"{}" -- psql -U postgres {} -c "reindex database {};"' |
UPDATE drupal_system s1 SET filename = | |
( | |
SELECT replace(filename,'_agenciabrasil2013','_sergioabr2013') | |
FROM drupal_system s2 | |
WHERE s2.name = s1.name | |
); |