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
agent-1 | 21:12:44.621 - Starting new HTTP connection (2): localhost:9227 | |
agent-1 | 21:12:44.622 - http://localhost:9227 "GET /json HTTP/1.1" 200 1241 | |
agent-1 | 21:12:44.622 - Dev Tools tabs: [{"description":"","devtoolsFrontendUrl":"\/devtools\/inspector.html?ws=localhost:9227\/devtools\/page\/25461C6D4A180E51532EFFF647ADA1F3","id":"25461C6D4A180E51532EFFF647ADA1F3","title":"Google Network Speech","type":"background_page","url":"chrome-extension:\/\/neajdppkdcdipfabeoofebfddakdcjhd\/_generated_background_page.html","webSocketDebuggerUrl":"ws:\/\/localhost:9227\/devtools\/page\/25461C6D4A180E51532EFFF647ADA1F3"},{"description":"","devtoolsFrontendUrl":"\/devtools\/inspector.html?ws=localhost:9227\/devtools\/page\/8F80467D6723E1E62220656F362997C5","id":"8F80467D6723E1E62220656F362997C5","title":"Google Hangouts","type":"background_page","url":"chrome-extension:\/\/nkeimhogjdpnpccoofpliimaahmaaome\/background.html","webSocketDebuggerUrl":"ws:\/\/localhost:9227\/devtools\/page\/8F80467D6723E1E62220656F362997C |
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
export function createStateCtx<A>( | |
defaultValue: A | |
): [ | |
() => { | |
state: A | |
update: Dispatch<SetStateAction<A>> | |
}, | |
FunctionComponent<{}> | |
] { |
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
[user] | |
name = Sven Petroll | |
email = sven.petroll@gmail.com | |
[alias] | |
s = status -s | |
a = !git add . && git status | |
au = !git add -u . && git status | |
aa = !git add . && git add -u . && git status | |
ai = add -i |
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
require 'prawn' | |
require 'prawn/table' | |
SKETCHUP_CONSOLE.show | |
UI.menu("Plugins").add_item("PDF: Generate") { | |
generate | |
} | |
def generate |
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
#<Prawn::Table:0x9db5c28 | |
@cells= | |
[#<Prawn::Table::Cell::Text:0x9db5a60 | |
@border_colors=["000000", "000000", "000000", "000000"], | |
@border_lines=[:solid, :solid, :solid, :solid], | |
@border_widths=[1, 1, 1, 1], | |
@borders=[:top, :bottom, :left, :right], | |
@colspan=1, | |
@column=0, | |
@content="foo", |
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
#<Prawn::Table:0x9db5c28 | |
@cells= | |
[#<Prawn::Table::Cell::Text:0x9db5a60 | |
@border_colors=["000000", "000000", "000000", "000000"], | |
@border_lines=[:solid, :solid, :solid, :solid], | |
@border_widths=[1, 1, 1, 1], | |
@borders=[:top, :bottom, :left, :right], | |
@colspan=1, | |
@column=0, | |
@content="foo", |
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
private string GetData() | |
{ | |
var conn = GetConnection(); | |
var articles = conn.Query<Article>("SELECT * FROM ART_DE"); | |
var o = new JObject(); | |
o["total_count"] = articles.Count(); | |
o["pos"] = 0; | |
var data = new JArray(); | |
foreach (var a in articles) |
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
class Node: | |
def __init__(self, val): | |
self.left = None | |
self.right = None | |
self.data = val | |
def insert(self, node): | |
if self.data < node.data: | |
if self.left is None: | |
self.left = node |
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
from functools import wraps | |
def log(f): | |
@wraps(f) | |
def wrapper(*args, **kwds): | |
result = f(*args,**kwds) | |
print "{}({})".format(f.__name__, args) | |
return result | |
return wrapper |
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
from time import time | |
from functools import wraps | |
curr_ms = lambda: int(round(time() * 1000)) | |
def timed(f): | |
@wraps(f) | |
def wrapper(*args, **kwds): | |
start = curr_ms() | |
result = f(*args, **kwds) | |
elapsed = curr_ms() - start |
NewerOlder