Skip to content

Instantly share code, notes, and snippets.

Taking a stroll across the keyboard.

Samuel Williams ioquatix

Taking a stroll across the keyboard.
Block or report user

Report or block ioquatix

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View rows.rb
#!/usr/bin/env ruby
require 'csv'
require 'logger'
logger =$stdout)
CSV do |csv|
5.times do "Generating row..."
ioquatix / O(N) memory allocations.txt
Created Apr 27, 2019
10k WebSockets with Falcon
View O(N) memory allocations.txt
[WebSocket::Driver::OpenEvent, 10000],
[WebSocket::Extensions, 10001],
[WebSocket::Driver::Headers, 10001],
[WebSocket::Driver::StreamReader, 10001],
[WebSocket::Driver::Hybi, 10001],
[Async::WebSocket::Server, 10001],
[Addrinfo, 10001],
[Async::HTTP::Protocol::HTTP1::Server, 10001],
[HTTP::Protocol::Headers, 10001],
View teapot.rb
# This file is part of the "Teapot" project, and is released under the MIT license.
teapot_version "2.3"
# Project Metadata
define_project "time" do |project|
ioquatix / async-slack.rb
Last active Jun 29, 2018
Make slack-api great again
View async-slack.rb
# This is used in production, but I've extracted everything here, so this particular code is untested, but should work.
gem 'async-http-faraday'
gem 'async-websocket'
gem 'slack-api'
require 'slack'
require 'async/http/url_endpoint'
ioquatix / atom.css
Created Mar 15, 2018
Switch off ligatures on current lines, in quoted strings, and in regular expressions
View atom.css
* {
-webkit-font-smoothing: antialiased;
atom-text-editor {
text-rendering: optimizeLegibility;
atom-text-editor.editor .syntax--comment {
font-style: normal !important;
View genesis_public_key
View Print out server hierarchy
#!/usr/bin/env ruby
require 'async/io'
require 'async/http/server'
require 'async/dns'
def print_server do |task|
task.async do
http_endpoints = Async::IO::Endpoint.tcp('localhost', 8081, reuse_port: true)
View Async & LightIO
#!/usr/bin/env ruby
require 'async'
require 'lightio'
def run_async(count = 10000)
start = do |task|
tasks = do
ioquatix / aio.rb
Last active Mar 28, 2017
rough outline of fiber based concurrency
View aio.rb
#!/usr/bin/env ruby
require 'fiber'
require 'nio'
module Async
class Async::Await
def initialize(ios, reactor)
ioquatix / gist:ad60402d99cc5bf9b1fb0f8b4ffc142f
Last active Aug 25, 2017
MikroTik HEX Gr3 PPPoE ONT Configuration for New Zealand
View gist:ad60402d99cc5bf9b1fb0f8b4ffc142f
# dec/12/2016 16:45:48 by RouterOS 6.37.3
# software id = RE4F-WKP7
/interface ethernet
set [ find default-name=ether2 ] name=ether2-master
set [ find default-name=ether3 ] master-port=ether2-master
set [ find default-name=ether4 ] master-port=ether2-master
set [ find default-name=ether5 ] master-port=ether2-master
/ip neighbor discovery
set ether1 discover=no
You can’t perform that action at this time.