Skip to content

Instantly share code, notes, and snippets.

View Shenziger's full-sized avatar
😀

Anton Larionov Shenziger

😀
View GitHub Profile
@Shenziger
Shenziger / .htaccess
Created March 5, 2017 21:21 — forked from agragregra/.htaccess
htaccess wget disable
RewriteCond %{HTTP_USER_AGENT} wget [NC]
RewriteRule .* - [F]
@Shenziger
Shenziger / .htaccess
Created March 5, 2017 21:21 — forked from agragregra/.htaccess
htaccess index.html & www redirect
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} www.placeburg.com [NC]
RewriteRule (.*) http://placeburg.com/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.(htm(l)?|php)\ HTTP/
RewriteRule ^(([^/]+/)*)index\.(htm(l)?|php)$ http://placeburg\.com/$1 [R=301,L]
{{ post.content | strip_html | truncatewords: 28 }}
{% for post in site.categories.[page.category] limit: 8 %}
{% include photo-item.html %}
{% endfor %}
<ul>{% for my_page in site.pages %}
{% if my_page.title %}
<li><a href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a></li>
{% endif %}
{% endfor %}</ul>
@Shenziger
Shenziger / jquery-filter-by-field.js
Created March 5, 2017 21:20 — forked from agragregra/jquery-filter-by-field.js
jQuery Input Field Filter
$(".city-input").keyup(function() {
filter(this);
});
function filter(element) {
var value = $(element).val().toLowerCase();
$("[data-filter]").each(function () {
var $this = $(this),
lower = $this.data("filter").toLowerCase();
if (lower.indexOf(value) > -1) {
$this.show();
@Shenziger
Shenziger / gulpfile.js
Created March 5, 2017 21:19 — forked from agragregra/gulpfile.js
Image Resize + Watermark + Thumbnails
var src = "___library/7-kazan/1/*";
var dst = "_ready";
var gulp = require('gulp'),
imagemin = require('gulp-imagemin'),
cache = require('gulp-cache'),
del = require('del'),
imageResize = require('gulp-image-resize'),
watermark = require("gulp-watermark"),
rename = require("gulp-rename");
@Shenziger
Shenziger / innobackupex-restore.sh
Created September 10, 2016 11:44 — forked from dalecaru/innobackupex-restore.sh
Scripts to create and restore full and incremental backups (for all databases on server) using innobackupex from Percona.
#!/bin/sh
#
# Script to prepare and restore full and incremental backups created with innobackupex-runner.
#
# This script is provided as-is; no liability can be accepted for use.
#
INNOBACKUPEX=innobackupex-1.5.1
INNOBACKUPEXFULL=/usr/bin/$INNOBACKUPEX
TMPFILE="/tmp/innobackupex-restore.$$.tmp"
@Shenziger
Shenziger / make.sh
Created October 26, 2015 18:58 — forked from artzub/make.sh
Install JetBrains Hub + YouTrack + UpSource + Nginx
#!/bin/bash
apt-get install mc htop git unzip wget curl -y
echo
echo "====================================================="
echo " WELCOME"
echo "====================================================="
echo
echo "Hub"
@Shenziger
Shenziger / header_resizer.js
Last active August 29, 2015 14:27
Dinamicly resize header with class .main_head
$(document).ready(function() {
function heightDetect() {
$(".main_head").css("height", $(window).height());
};
heightDetect();
$(window).resize(function() {
heightDetect();