Skip to content

Instantly share code, notes, and snippets.

Crystal vs Node.js Websocket Benchmark

Crystal 0.9.1 with Kemal

require "kemal"

ws "/" do |socket|
  socket.on_message do |message|
 end
@diniremix
diniremix / dockersetup.MD
Last active September 22, 2016 14:16
setup docker on elementary OS freya

instalar docker

instalar una imagen (ubuntu 14.04 en este caso)

  • sudo docker run ubuntu:14.04

revisar las imagenes instaladas

  • sudo docker images

entrar en la imagen recien creada

@rabbitt
rabbitt / schema_clone.py
Last active October 8, 2020 12:56
PostgreSQL schema cloner (including data).
import psycopg2 as pg
from io import BytesIO
from collections import defaultdict
from contextlib import contextmanager
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT, ISOLATION_LEVEL_READ_COMMITTED
READ_COMMIT = ISOLATION_LEVEL_READ_COMMITTED
AUTO_COMMIT = ISOLATION_LEVEL_AUTOCOMMIT
@rye
rye / vomit.ru
Last active January 30, 2017 11:38
A Ruby web server to act like Python's SimpleHTTPServer module.
#!/usr/bin/env rackup
#\ -E deployment
use Rack::ContentLength
app = Rack::Directory.new Dir.pwd
run app
@terrancesnyder
terrancesnyder / setenv.sh
Created May 23, 2011 00:07
./setenv.sh - example setenv.sh with defaults set for minimal time spent in garbage collection
#! /bin/sh
# ==================================================================
# ______ __ _____
# /_ __/___ ____ ___ _________ _/ /_ /__ /
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / /
# / / / /_/ / / / / / / /__/ /_/ / /_ / /
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/
# Multi-instance Apache Tomcat installation with a focus
# on best-practices as defined by Apache, SpringSource, and MuleSoft