sudo visudoДобавляем в самый конец строчку где superpuperuser - ваш логин
superpuperuser ALL=(ALL) NOPASSWD: ALLГотово
sudo visudoДобавляем в самый конец строчку где superpuperuser - ваш логин
superpuperuser ALL=(ALL) NOPASSWD: ALLГотово
[I 120704 17:24:50 application:264] 200 GET /session/info/ (xxx.33.251.70) 138.56ms [I 120705 18:17:15 application:264] 200 GET /catalog/xxxx/(xxx.33.251.70) 572.84ms [I 120706 12:24:53 application:264] 200 GET /session/info/ (xxx.33.251.70) 127.04ms [I 120706 13:03:12 application:264] 200 GET /session/login/ (xxx.33.251.70) 10.36ms [I 120706 13:05:04 application:264] 200 GET /session/info/ (xxx.33.251.70) 209.89ms [I 120706 13:06:59 application:264] 200 GET /session/info/ (xxx.33.251.70) 10.08ms [I 120710 16:50:53 application:274] 200 GET /session/info/ (xxx.33.251.70) 171.46ms
# grep '200 GET' ./log/webapp.log | sed 's/ms/ ms/g' | awk '{ if ($9 > 100 ) print $p0'}
set autocommit=0 unique_checks=0 foreign_key_checks=0
#sudo service mysqld restartПосле импорта дампа - нужно вернуть на место родные значения.
Outlook Error Not updated There is a problem with the certificate for mymailserver.ru. Contact a support person or your service provider. Error code: 80072F0D
server_tokens off;
expose_php = Off
from datetime import datetime, timedelta import tornado.escape class MyApplication(): def get_expire_time(self): start = datetime.now() session_length = self.settings['session_time'] delta = timedelta(seconds=session_length) expires = start + delta return expires def save_session(self, data) end_time = time.mktime(self.get_expire_time().timetuple()) self.mc.set(key, tornado.escape.json_encode(data), end_time)Навеяно StackOverflow
from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import quopri def QuoHead(String): s = quopri.encodestring(String.encode('UTF-8'), 1, 0) return "=?utf-8?Q?" + s.decode('UTF-8') + "?=" FIOin = "Андрей Петрович" emailout = "some@test.ru" emailin = "some2@test.ru" msg = MIMEMultipart() msg["Subject"] = QuoHead("Добрый день " + FIOin).replace('=\n', '') msg["From"] = (QuoHead("Ирина Федоровна") + " <" + emailout + ">").replace('=\n', '') msg["To"] = (QuoHead(FIOin) + " <" + emailin + ">").replace('=\n', '') m = """Добрый день. Это тестовое письмо. Пожалуйста, не отвечайте на него.""" text = MIMEText(m.encode('utf-8'), 'plain', 'UTF-8') msg.attach(text) print(msg.as_string())
ssh -f -L 8080:my.super.puper.host.ru:3306 -l remote_user another.my.super.system.org sleep 60
mysql -h 127.0.0.1 -P 8080 -u user -p database
$ /usr/local/zend/mysql/bin/mysql /etc/zce.rc doesn't exist!
ZCE_PREFIX=/usr/local/zend if [ -z "$LIBPATH" ];then LIBPATH=/lib:/usr/lib:/usr/local/zend/lib else LIBPATH=$LIBPATH:/usr/local/zend/lib fi export LIBPATH APACHE_VER=2.2.11 WEB_USER=qtmhhttp WEB_GROUP=nogroup APACHE_PID_FILE= PRODUCT_NAME=ZendServer PRODUCT_VERSION=5.0.0 export INSTALLATION_UID=091708121207 DIST=pe JB_EN=true ZEND_TMPDIR=/tmp
sudo ln -s /usr/local/zend/mysql/bin/mysql /usr/bin/mysql
sudo supervisorctl reread sudo supervisorctl update
$ sudo /opt/local/bin/port install sshfs Warning: The Command Line Tools for Xcode don't appear to be installed; most ports will likely fail to build. Warning: See http://guide.macports.org/chunked/installing.xcode.html for more information. ---> Computing dependencies for sshfsError: Unable to execute port: can't read "build.cmd": Failed to locate 'make' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it? To report a bug, see http://guide.macports.org/#project.tickets
Ivan Ivanov is not a verified user
*#1234#
def main(): application = tornado.web.Application([ (r"/", MainHandler), ]) # this line will setup default logging no matter if you use command options tornado.options.parse_command_line()
logging.info("starting torando web server") http_server = tornado.httpserver.HTTPServer(application) http_server.listen(8888) # hardcoded port tornado.ioloop.IOLoop.instance().start()
mneradkov@mneradkov-thinkpad:~/workspace/mysuperproject$ ./webapp.py [I 120315 16:33:28 mixins:28] [INFO] Directory [/home/mneradkov/workspace/mysuperproject] [I 120315 16:33:28 mixins:28] [INFO] Connected to MySQL [xx.xx.xx.xx:xxxx] [I 120315 16:33:28 mixins:28] [INFO] Connected to memcache [127.0.0.1:11211] [I 120315 16:33:28 mixins:28] [INFO][I 120315 16:33:28 mixins:28] [INFO] Server [My Super Server] version [X.Xalpha] binded to [127.0.0.1:11100] [I 120315 16:33:28 webapp:37] Starting I/O loop to serve requests...
find . -name .svn -exec rm -rf {} \;