Skip to content

Instantly share code, notes, and snippets.

View rusenask's full-sized avatar
🤔
why is there a status message field on github?

Karolis Rusenas rusenask

🤔
why is there a status message field on github?
View GitHub Profile
@lbolla
lbolla / futures_test.py
Last active April 24, 2023 17:59
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)
@kwmt
kwmt / Castle.xml
Last active November 9, 2021 01:16 — forked from bemasher/Castle.xml
<?xml version="1.0" encoding="UTF-8" ?>
<Data>
<Series>
<id>83462</id>
<Actors>|Nathan Fillion|Stana Katic|Molly C. Quinn|Jon Huertas|Seamus Dever|Tamala Jones|Susan Sullivan|Ruben Santiago-Hudson|Monet Mazur|</Actors>
<Airs_DayOfWeek>Monday</Airs_DayOfWeek>
<Airs_Time>10:00 PM</Airs_Time>
<ContentRating>TV-PG</ContentRating>
<FirstAired>2009-03-09</FirstAired>
<Genre>|Drama|</Genre>
@cloverstd
cloverstd / cache.py
Last active October 27, 2021 05:35
tornado cache
# coding: utf-8
try:
import cPickle as pickle
except ImportError:
import pickle
try:
import hashlib
sha1 = hashlib.sha1
@mitchwongho
mitchwongho / Docker
Last active September 23, 2024 12:09
Docker 'run' command to start an interactive BaSH session
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash
@magnetikonline
magnetikonline / README.md
Last active June 5, 2024 01:05
NSSM - the Non-Sucking Service Manager cheatsheet.
@chantastic
chantastic / on-jsx.markdown
Last active November 10, 2024 13:39
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@samwhitehall
samwhitehall / apple-keyboard-ubuntu.md
Last active September 14, 2019 20:28
Apple Keyboard on Ubuntu 16.04
  1. use English (UK, Macintosh) as the base keyboard layout

  2. https://help.ubuntu.com/community/AppleKeyboard#Ubuntu_11.10_up_to_recent (steps 1,2,3) to fix wrong keys (§± and `~)

  3. dconf-editor org.gnome.desktop.input-sources.xkb-options ~> ['lv3:lalt_switch', 'lv3:ralt_alt']

  4. compizconfig-settings-manager (ccsm)

        desktop > ubuntu unity plugin > general > key to show the menu bar:     
@wallyqs
wallyqs / nats-cluster-tls-kubernetes.org
Last active September 9, 2022 11:41
Secure NATS Cluster in Kubernetes

Secure NATS Cluster in Kubernetes

Creating the certificates

Generating the Root CA Certs

{
    "CN": "My Custom CA",
@alex-leonhardt
alex-leonhardt / main.go
Last active October 11, 2024 11:34
golang text/template with a map[string]interface{} populated from mixed json data
package main
import (
"encoding/json"
"os"
"reflect"
"text/template"
)
@DaisukeMiyamoto
DaisukeMiyamoto / assume_role.py
Created September 12, 2018 05:00
AWS Boto3 Assume Role example
import boto3
from boto3.session import Session
def assume_role(arn, session_name):
"""aws sts assume-role --role-arn arn:aws:iam::00000000000000:role/example-role --role-session-name example-role"""
client = boto3.client('sts')
account_id = client.get_caller_identity()["Account"]
print(account_id)