I hereby claim:
- I am mrasband on github.
- I am mrasband (https://keybase.io/mrasband) on keybase.
- I have a public key ASCXYIf-204dJgh_rq6URfVdt7IgG5vMuq23a8PUvJB19Ao
To claim this, I am signing this object:
--ignore-dir=.idea/ | |
--ignore-dir=coverage/ | |
--ignore-dir=node_modules/ | |
--ignore-dir=bower_components/ | |
--ignore-dir=target/ | |
--ignore-dir=bin/ | |
--ignore-dir=log/ | |
--ignore-dir=dist/ | |
--type-set=json=.json |
set -g default-shell /bin/zsh | |
set -g default-terminal 'xterm-256color' | |
set-window-option -g pane-base-index 1 | |
set-window-option -g mode-keys vi | |
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"' | |
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" | |
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" | |
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" | |
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" |
#!/usr/bin/env python3 | |
import aiohttp | |
from aiohttp import web | |
from urllib.parse import urlencode | |
GOOGLE_SECRET = '<google secret>' | |
GOOGLE_CLIENT_ID = '<google client id>' | |
async def google_oauthcallback(request): |
public class HotObservable implements Observable.OnSubscribe<String> { | |
private final List<Subscriber<? super String>> subscribers = | |
Collections.synchronizedList(new LinkedList<Subscriber<? super String>>()); | |
private final OkHttpClient client = new OkHttpClient.Builder() | |
.readTimeout(0, TimeUnit.DAYS).build(); | |
private final String eventUrl; | |
public SSEObservableHot(String eventUrl) { | |
this.eventUrl = eventUrl; | |
} |
import asyncio | |
@asyncio.coroutine | |
def solve_the_universe(*urls): | |
solutions = [] | |
for url in urls: | |
value = (yield from call_something_async(url)) | |
solutions.append(value) | |
return solutions |
I hereby claim:
To claim this, I am signing this object:
import asyncio | |
@asyncio.coroutine | |
def my_async_function(timeout): | |
yield from asyncio.sleep(timeout) | |
print('Slept, non-blocking, for', timeout, 'seconds') | |
loop = asyncio.get_event_loop() | |
loop.run_until_complete(my_async_function(3)) |
import asyncio | |
async def my_async_function(timeout): | |
await asyncio.sleep(timeout) | |
print('Slept, non-blocking, for', timeout, 'seconds') | |
loop = asyncio.get_event_loop() | |
loop.run_until_complete(my_async_function(3)) |
import asyncio | |
@asyncio.coroutine | |
def first_async_function(): | |
yield from asyncio.sleep(2.5) | |
return 'Result found!' | |
async def new_async_function(): | |
res = await first_async_function() |
import asyncio | |
def long_running_system_task(): | |
import time | |
print('starting background task') | |
# Normally this would block the event loop, but it's okay | |
# when called in another thread with an executor :) | |
time.sleep(3) | |
return 'finished tasks' |