- _ NAT Home network
) IPv4 |
)<----> ISP <----> Router-|
Public ) |
# | |
# Example of a user's .screenrc file | |
# | |
# http://www.orkut.com/CommMsgs.aspx?cmm=1988&tid=4 | |
# This is how one can set a reattach password: | |
# password ODSJQf.4IJN7E # "1234" | |
multiuser on |
<html> | |
<head> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5.2.min.js"></script> | |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
<script type="text/javascript"> | |
var map = null; | |
function initializeMap() { | |
$.getJSON("http://www.ombord.info/api/jsonp/position/?callback=?", function(gpsData) { | |
var currentPosition = new google.maps.LatLng(gpsData.latitude, gpsData.longitude); | |
map = new google.maps.Map(document.getElementById("map_canvas"), { |
from time import sleep | |
from tornado.httpserver import HTTPServer | |
from tornado.ioloop import IOLoop | |
from tornado.web import Application, asynchronous, RequestHandler | |
from multiprocessing.pool import ThreadPool | |
_workers = ThreadPool(10) | |
def run_background(func, callback, args=(), kwds={}): | |
def _callback(result): |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
############################################################################### | |
# The MIT License | |
# | |
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
BIOS Setup | |
---------- | |
1) Boot into the BIOS setup utility (press F2 or DEL) and open Advanced > Serial Port Console Redirection. | |
2) Disable COM1 and EMS console redirection and enable SOL redirection. | |
3) Set the SOL console redirection settings as follows: | |
Aptio Setup Utility - Copyright (C) 2012 American Megatrends, Inc. | |
Advanced | |
/----------------------------------------------------+-------------------------\ |
I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)
kernel.shmmax = 8000234752 // Это для PostgreSQL, чтоб можно было выставлять большой shared_buffers (6 - 8GB) | |
fs.file-max = 99999999 // Это для Nginx, без него можно получить "Too many open files" | |
net.ipv4.tcp_max_syn_backlog=524288 // Максимальное число запоминаемых запросов на соединение | |
net.ipv4.tcp_max_orphans=262144 // Максимальное число допустимых в системе сокетов TCP | |
net.core.somaxconn=65535 // Максимальное число открытых сокетов | |
net.ipv4.tcp_mem=1572864 1835008 2097152 // Потребление памяти для протокола TCP | |
net.ipv4.tcp_rmem=4096 16384 16777216 // Размер приемного буфера сокетов TCP | |
net.ipv4.tcp_wmem=4096 32768 16777216 // Количество памяти, резервируемой для буферов передачи сокета TCP |
from sqlalchemy.ext.declarative import declarative_base | |
#from sqlalchemy import * | |
#from sqlalchemy.orm import * | |
# Pro entity v podadresari. Podaresar *musi* obsahovat prazdny soubor __init__.py ! | |
#from entity.User import User | |
''' | |
Zavislosti: | |
# apt-get install python-sqlalchemy |