Skip to content

Instantly share code, notes, and snippets.

View cronfy's full-sized avatar
🎯
Focusing

Олег Петрачев cronfy

🎯
Focusing
  • Санкт-Петербург
View GitHub Profile
@cronfy
cronfy / remove_closing_tags.sh
Last active February 10, 2017 05:31 — forked from lorenzo/remove_closing_tags.sh
Script to remove all closing ?> php tags in a folder
#!/bin/bash
###
echo "Use PHP_CodeSniffer: https://github.com/squizlabs/PHP_CodeSniffer"
echo
echo "Rules:"
echo " * PSR2.Files.ClosingTag"
echo " * PSR2.Files.EndFileNewline"
echo " * Generic.Files.LineEndings"
@cronfy
cronfy / maintenance.html
Last active June 6, 2023 19:44 — forked from pitch-gist/gist:2999707
HTML: Техническое обслуживание сайта (503) (Simple Maintenance Page)
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Техническое обслуживание</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
@cronfy
cronfy / .htaccess
Last active July 23, 2021 19:44 — forked from donnykurnia/.htaccess
.htaccess 503 Техническое обслуживание сайта (maintenance page)
AddDefaultCharset utf-8
ErrorDocument 503 /maintenance.html
RewriteEngine On
RewriteBase /
# uncomment and set your ip to allow your ip to enter
#RewriteCond %{REMOTE_ADDR} !1\.2\.3\.4
# block requests to site, but allow let's encypt generation
@cronfy
cronfy / convertShortOpenTags.sh
Last active September 26, 2017 16:33 — forked from peterjaap/convertShortOpenTags.sh
PHP: Replace short open tag <? with full form <?php
# Uncomment last line if you want to replace <?= with <?php echo
find . -type f -iname '*.php' -print0 |
xargs -0 sed -i \
-e 's/<? /<?php /g' \
-e 's/<?$/<?php/' \
-e 's/<?\/\//<?php \/\//g' \
-e 's/<?\/\*/<?php \/\*/g' \
# -e 's/<?\=/<?php echo /g'