Skip to content

Instantly share code, notes, and snippets.

View wbednarski's full-sized avatar

Wojciech Bednarski wbednarski

View GitHub Profile
@wbednarski
wbednarski / rename_phoenix_project.sh
Last active September 19, 2024 04:43 — forked from krystofbe/rename_phoenix_project.sh
rename a phoenix 1.3 project
#!/bin/bash
set -e
CURRENT_NAME="Zauberantrag"
CURRENT_OTP="zauberantrag"
NEW_NAME="Wunderantrag"
NEW_OTP="wunderantrag"
@wbednarski
wbednarski / phoenix showdown rackspace onmetal io.md
Last active August 5, 2016 23:06 — forked from omnibs/phoenix showdown rackspace onmetal io.md
Phoenix Showdown Comparative Benchmarks @ Rackspace

Comparative Benchmark Numbers @ Rackspace

I've taken the benchmarks from Matthew Rothenberg's phoenix-showdown, updated Phoenix to 0.13.1 and ran the tests on the most powerful machines available at Rackspace.

Results

Framework Throughput (req/s) Latency (ms) Consistency (σ ms)
SMS_LENGTH = 160
MPM_SIZE_LONG = 16
MPM_SIZE_SHORT = 14
MPM_SHORT_LIMIT = 1314
def send_sms_message(text, to, from)
unless text.length > SMS_LENGTH
deliver_message_via_carrier(text, to, from)
else
parts = text.scan(/.{1,#{SMS_LENGTH - (text.length > MPM_SHORT_LIMIT ? MPM_SIZE_LONG : MPM_SIZE_SHORT)}}/)
def read_readme?
while true
print 'Did you read README.md? [y/n]: '
case gets.strip
when 'y', 'Y', 'yes'
puts 'Awesome!'
break
when /\A[nN]o?\Z/
@wbednarski
wbednarski / index.html
Created January 13, 2011 17:03
HTML5 base kick start
<!doctype html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<style>@import 'm.css';</style>
</head>
<body>