Skip to content

Instantly share code, notes, and snippets.

View liquid1982's full-sized avatar

Vincenzo Acinapura liquid1982

  • TrustLayer, Inc.
  • Miami, FL
View GitHub Profile
@liquid1982
liquid1982 / System Design.md
Created September 4, 2018 19:46 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@liquid1982
liquid1982 / Gemfile
Created September 30, 2013 06:42 — forked from zernel/Gemfile
gem 'devise'
gem 'omniauth'
gem 'omniauth-github'
gem "omniauth-twitter"
gem "omniauth-facebook"
gem "omniauth-google-oauth2"
#!/sbin/runscript
# GitLab init script for Gentoo Linux
# see https://github.com/gitlabhq/gitlabhq/blob/master/doc/installation.md
GITLAB_BASE=/home/gitlab/gitlab
GITLAB_USER=gitlab
depend() {
need net mysql redis
}
#! /bin/bash
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the unicorn web server
# Description: starts unicorn
include Tire::Model::Search
include Tire::Model::Callbacks
settings :analysis => {
:filter => {
:ngram_filter => {
:type => 'edgeNGram',
:min_gram => 1,
:max_gram => 10,
:side => 'front'
# Example code and benchmark harness for http://blog.gregspurrier.com/articles/arbitrary-reordering-of-ruby-arrays
require 'rubygems'
require 'rspec'
module Enumerable
def reorder_by1(order, &key_proc)
order.map do |x|
find {|obj| key_proc.call(obj) == x}
end