Skip to content

Instantly share code, notes, and snippets.

@fxtentacle
fxtentacle / agent.conf
Created October 31, 2011 20:44
Hajo's logstash config
input {
exec {
type => "dstat"
command => "dstat -cdngypms --nocolor 1 0"
interval => 13
}
exec {
type => "apache-benchmark"
@ndarville
ndarville / business-models.md
Last active January 13, 2024 17:27
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@staltz
staltz / introrx.md
Last active July 25, 2024 13:33
The introduction to Reactive Programming you've been missing
@zeroasterisk
zeroasterisk / VelocityNotes2014.md
Last active August 29, 2015 14:03
Some wonderful notes, from an amazing developer I work with, on his recent attendance at Velocity Conf.
From: Matt (https://github.com/mreishus)
Date: Mon, Jun 30, 2014
Subject: Velocity Conference CA 2014 Trip Report

Summary Evaluation of Velocity 2014:

  • The mobile share of internet traffic is on pace to eclipse desktop traffic within 2014. As a whole, developers are doing a poor job of optimizing for mobile and users are frustrated. Mobile sites are actually trending slower year over year, even with faster devices accounted for.
  • Even desktop performance affects business metrics (like conversion rate, bounce rate, page views, etc..). This can usually be measured without taking the time to optimize performance; most sites are serving a mixture of fast and slow experiences to users. Just correlate the metric vs performance while controlling for some variables (like location).
  • From Puppet's State of DevOps Report in 2014 - IT performance was qualified in a statistically valid way and highly correlated with these three independent metrics: MTTR (mean time to recover), lead time for chang
@ramntry
ramntry / automemoization.hs
Last active September 25, 2022 13:05
Auto-memoization in Haskell by State monad
import Control.Monad.State
import qualified Data.Map as Map
recall :: Ord a => a -> State (Map.Map a r) (Maybe r)
recall n = do
memory <- get
return (Map.lookup n memory)
memorize :: Ord a => a -> r -> State (Map.Map a r) ()
memorize n result = do
haproxy.conf
============
frontend spdy
mode tcp
bind xxx.xxx.xxx.xxx:443 ssl crt /etc/haproxy/ssl.pem crt /etc/haproxy/certs.d npn spdy/3.1,http/1.1 ciphers AES256+EECDH:AES256+EDH:AES128+EDH:EECDH:!aNULL:!eNULL:!LOW:!DES:!3DES:!RC4; no-sslv3
option tcplog
log global
# route to nginx
@stevedomin
stevedomin / create_post.exs
Last active July 6, 2024 17:22
Using UUIDs as primary key with Ecto
defmodule MyBlog.Repo.Migrations.CreatePost do
use Ecto.Migration
def change do
create table(:posts, primary_key: false) do
add :id, :uuid, primary_key: true
add :body, :string
add :word_count, :integer
timestamps
@heppu
heppu / ARCH_INSTALL.MD
Last active February 27, 2022 17:01
Installing Arch with GPT, dm-crypt, LUKS, LVM and systemd-boot

Create bootable USB

dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress oflag=sync

Boot from USB and set prepare system

loadkeys <your-keymap>
@tkh44
tkh44 / Animation.jsx
Last active September 13, 2022 01:31
react-router v4 animated with data-driven-motion
import React from 'react'
import { BrowserRouter as Router, Route, Link, Redirect, matchPath } from 'react-router-dom'
import { Motion } from 'data-driven-motion' // https://github.com/tkh44/data-driven-motion
const WOBBLY_SPRING = { stiffness: 200, damping: 15, precision: 0.1 }
const AnimationExample = () => (
<Router>
<div>
<ul>
@OdinsPlasmaRifle
OdinsPlasmaRifle / arch_linux_installation.md
Last active July 14, 2024 19:55
LVM on LUKS Arch installation with systemd-boot