Skip to content

Instantly share code, notes, and snippets.

@lucasrcosta
lucasrcosta / machine.js
Created August 14, 2021 01:32
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
### Keybase proof
I hereby claim:
* I am lucasrcosta on github.
* I am lucasrcosta (https://keybase.io/lucasrcosta) on keybase.
* I have a public key ASC740SliHi5QE_dGw3zLgq31VrXo4DmPqMshaDG8juU8Ao
To claim this, I am signing this object:
@lucasrcosta
lucasrcosta / awslambda.bootstrap.py
Last active October 26, 2021 12:06
AWS Lambda Python Runtime
# -*- coding: utf-8 -*-
# /var/runtime/awslambda/bootstrap.py
"""
aws_lambda.bootstrap.py
Amazon Lambda
Copyright (c) 2013 Amazon. All rights reserved.
Lambda runtime implemention
"""
@lucasrcosta
lucasrcosta / tornado_handler_thread_decorator.py
Last active February 20, 2019 08:51
Tornado Handler Thread Decorator
from concurrent.futures import ThreadPoolExecutor
from datetime import timedelta
from tornado import gen
from tornado.concurrent import run_on_executor
THREADPOOL_MAX_WORKERS = 10
THREADPOOL_TIMEOUT_SECS = 30
def onthread(function):
@lucasrcosta
lucasrcosta / log.js
Created June 14, 2016 20:32
console.log shortcut
log = console.log.bind(console)
@lucasrcosta
lucasrcosta / designer.html
Created December 23, 2014 20:27
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
@lucasrcosta
lucasrcosta / 960gs.less
Created January 11, 2012 19:14 — forked from Aeon/960gs.less
LessCSS and 960gs don't play well together normally. Here's the definitions for 960gs to let LessCSS work with it. Looks like we can pull all grid data out of the HTML.
/**
* A LessCSS version of the 960 Grid System
*
* http://lesscss.org/
* http://960.gs/
*/
/*********************************************************************
* Settings *
*********************************************************************/