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 | |
speedUp=$1 | |
speedDown=$2 | |
# Удаление очередей | |
/sbin/tc qdisc del dev eth1 ingress | |
/sbin/tc qdisc del dev eth1 root handle 1: | |
# Ограничение скорости отдачи |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
__author__ = 'Andrey Smirnov' | |
__email__ = 'mail@ansmirenov.ru' | |
import requests | |
import json | |
import sys |
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
import java.util.*; | |
import java.lang.*; | |
import java.io.*; | |
import org.mentaregex.*; | |
import java.util.Arrays; | |
class Main { | |
public static void main (String[] args) throws java.lang.Exception { | |
String[] matches = match("aa11bb22", "/(\\d+)/g" ); | |
System.out.println(Arrays.toString(matches)); |
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 | |
# aboncnt.sh <areaid> <status_code> | |
DB_USER=... | |
DB_PASS=... | |
DB_NAME=... | |
ADDRESS_PID=... | |
/bin/echo "SELECT count(DISTINCT c.id) FROM contract_parameter_type_2 as p INNER JOIN contract as c ON p.cid=c.id WHERE p.hid in (SELECT id FROM address_house WHERE areaid=$1) AND c.status = $2 AND p.pid=${ADDRESS_PID};" | /usr/bin/mysql --skip-column-names -u${DB_USER} -p${DB_PASS} ${DB_NAME} |
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
\begin{titlepage} | |
\thispagestyle{empty} | |
\centerline{Министерство образования и науки РФ} | |
\centerline{РЫБИНСКИЙ ГОСУДАРСТВЕННЫЙ АВИАЦИОННЫЙ} | |
\centerline{ТЕХНИЧЕСКИЙ УНИВЕРСИТЕТ имени П. А. Соловьева} | |
\vfill |
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
\begin{titlepage} | |
\thispagestyle{empty} | |
\begin{small} | |
\renewcommand{\baselinestretch}{1.0} % Полуторный интервал | |
\centerline{Министерство образования и науки РФ} | |
\centerline{Федеральное государственное бюджетное образовательное учреждение} |
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
package ru.bitel.bgbilling.modules.tv.dyn.cryptoguard; | |
import java.net.*; | |
import java.text.*; | |
import java.util.*; | |
import java.io.*; | |
import javax.annotation.Resource; | |
import org.apache.log4j.Logger; |
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
#!/usr/bin/python | |
# prepare_tex.py | |
import sys | |
import re | |
def cat(fn): | |
return open(fn, 'rt').read().replace('\\', '====') | |
def prepare_tex(fn): |
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 | |
# Block Tor Exit nodes | |
IPTABLES_TARGET="DROP" | |
IPTABLES_CHAINNAME="TOR" | |
EXTERNAL_IP="xx.xx.xx.xx" | |
if ! iptables -L TOR -n >/dev/null 2>&1 ; then | |
/sbin/iptables -N TOR >/dev/null 2>&1 | |
/sbin/iptables -A INPUT -p tcp -j TOR 2>&1 | |
fi |
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 | |
# Andrey Smirnov <mail@ansmirnov.ru> | |
# http://blog.ansmirnov.ru/2015/06/05/bgbilling-clean-old-tables/ | |
MYSQL_USER='***' | |
MYSQL_PASS='***' | |
MYSQL_DB='bgbilling' | |
MODULE_ID=7 | |
START_DATE="201503" |
NewerOlder