##mailinglists
##list of speakers
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
require 'optparse' | |
require 'redic' | |
options = { | |
port: 6379, | |
host: '127.0.0.1', | |
match: nil, |
source 'https://rubygems.org' | |
gem 'rake' | |
gem 'lotus-router' | |
gem 'lotus-controller' | |
gem 'lotus-view' | |
group :test do | |
gem 'rspec' | |
gem 'capybara' |
##mailinglists
##list of speakers
A stupidly simple implementation of a kind of "sorta immutable" struct that can be instantiated as conveniently as an OpenStruct
but after instantiation it doesn't let me (easily) add fields or mutate them:
guy = ClosedStruct.new( name: "John", age: 23 )
# readers:
guy.name #=> "John"
guy.age #=> 23
# Install ARCH Linux with encrypted file-system and UEFI | |
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
# Download the archiso image from https://www.archlinux.org/ | |
# Copy to a usb-drive | |
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
# Set swedish keymap |
package main | |
import ( | |
"image" | |
_ "image/gif" | |
_ "image/jpeg" | |
_ "image/png" | |
"io" | |
"mime" |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns on recent CPU
L2 cache reference ........................... 7 ns 14x L1 cache
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs 4X memory
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
Located in alphabetical order (not prefer)
C
ab
), also designed as a more modern replacement, written in C
golang
)#! /bin/sh | |
# If you often mistype "git add", you could alias "ad=add". Or, you could use | |
# this script. | |
random=$(( RANDOM % 3 )); | |
case $random in | |
0) echo "Buy Git! Now with 20% more rebase!";; | |
1) echo "Merge, branch, AND rebase? But wait, there's more!";; |