Skip to content

Instantly share code, notes, and snippets.

@nezaidu
nezaidu / gcm-high-prio.sh
Created November 11, 2016 15:42 — forked from sebastianbenz/gcm-high-prio.sh
Send high priority GCM messages via curl (Android Doze mode & App Standby testing)
curl -X POST \
-H "Authorization: key= YOUR-API-KEY" \
-H "Content-Type: application/json" \
-d '{
"registration_ids": [
"YOUR-GCM-REGISTRATION-ID"
],
"data": {
"message": "Hello Message"
},
1) http://www.cian.ru/rent/commercial/13169910/
Чеховская, 6 минут до метро, еще рядом трубная, 500м, то есть наша ветка, 100к в месяц(торг), 70м2
плюсы
большой, светлый опеспейс, много окон. есть вторая комната, можно использовать как комнату отдыха и переговорную, свой туалет
рядом сквер, цветной бульвар, там есть места где поесть и выпить. можно пешком дойти до лубянки.
минусы
стойка ресепшн, но ее можно и нужно разобрать, не ясен статус здания - с кем делить. туалет разъебанный
http://www.cian.ru/rent/commercial/13871187/
http://www.cian.ru/rent/commercial/12220506/
http://www.cian.ru/rent/commercial/13169910/
http://www.cian.ru/rent/commercial/13884754/
http://www.cian.ru/rent/commercial/13700521/
http://www.cian.ru/rent/commercial/13986847/
http://www.cian.ru/rent/commercial/11387663/
http://www.cian.ru/rent/commercial/12635232/
http://www.cian.ru/rent/commercial/4252419/
http://www.cian.ru/rent/commercial/13986767/
@nezaidu
nezaidu / futures_test.py
Created October 21, 2015 09:26 — forked from lbolla/futures_test.py
Tornado and concurrent.futures
from concurrent.futures import ThreadPoolExecutor
from functools import partial, wraps
import time
import tornado.ioloop
import tornado.web
EXECUTOR = ThreadPoolExecutor(max_workers=4)
hopscotch_state = {serviceTour: "step:3", extensionTour: "step:0"}
App.profileModel.set("hopscotch_state", hopscotch_state)
App.profileModel.save()
window.localStorage.setItem('hopscotch_state', JSON.stringify(hopscotch_state))
@nezaidu
nezaidu / run-worker.sh
Created September 24, 2015 10:43 — forked from taylorhughes/run-worker.sh
Celery example with tasks of varying length + -Ofair
# tested with celery[redis]==3.1.17
# to run with default configuration -- tasks will take 14 seconds to complete the 20 tasks in start_all() below
celery worker -A cluster_project.celery_app -Q tester -lINFO --concurrency=4
# to run with -Ofair -- tasks will take 10 seconds to complete
celery worker -A cluster_project.celery_app -Q tester -lINFO --concurrency=4 -Ofair
Вконтакте нельзя прикреплять более 10 прикреплений.
#http://comments.gmane.org/gmane.comp.python.tornado/8657
ERROR:tornado.application:Exception in callback (<socket._socketobject object at 0x3611520>, <function null_wrapper at 0x361ff50>)
Traceback (most recent call last):
File "/home/my-smy/.Envs/my-smy/local/lib/python2.7/site-packages/tornado/ioloop.py", line 866, in start
handler_func(fd_obj, events)
File "/home/my-smy/.Envs/my-smy/local/lib/python2.7/site-packages/tornado/stack_context.py", line 275, in null_wrapper
return fn(*args, **kwargs)
File "/home/my-smy/.Envs/my-smy/local/lib/python2.7/site-packages/tornado/netutil.py", line 265, in accept_handler
callback(connection, address)
File "/home/my-smy/.Envs/my-smy/local/lib/python2.7/site-packages/tornado/tcpserver.py", line 239, in _handle_connection
FLASK
{
'Content-Length': '98',
'Accept-Encoding': 'identity',
'Host': '0.0.0.0: 8888',
'User-Agent': 'Mozilla/5.0(Windows;U;WindowsNT5.1;de;rv: 1.9.1.5)Gecko/20091102Firefox/3.5.5',
'Connection': 'close',
'Content-Type': 'application/x-www-form-urlencoded'
}
set -g utf8
set-window-option -g utf8 on
# make tmux display things in 256 colors
set -g default-terminal "screen-256color"
# set scrollback history to 10000 (10k)
set -g history-limit 10000
# set Ctrl-a as the default prefix key combination