Skip to content

Instantly share code, notes, and snippets.

View SerCeMan's full-sized avatar

Sergey Tselovalnikov SerCeMan

View GitHub Profile
@SerCeMan
SerCeMan / intensivedata.txt
Last active March 17, 2021 08:26
Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems
# Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems
1. **Chapter 1. Reliable, Scalable and Maintainable Applications**
1. R faults != failures, faults cause failures. Systems should be fault-tolerant, resistant to some types of faults
2. S Amazon cares about 99.9% percentile because people with higher latencies usually are people who have the most data and therefore, they’re most valuable customers
3. S tail latency amplification - multiple requests one critical path during one page served
2. **Chapter 2. Data Models and Query Languages**
1. Hierarchical model - imperative querying, no way to change schema, children are ordered, no many-to-many
2. CODASYL (network) vs SQL
3. NoSQL - often no schema (precisely - schema on read vs schema on write)
### Keybase proof
I hereby claim:
* I am serceman on github.
* I am serce (https://keybase.io/serce) on keybase.
* I have a public key ASADB4KIVo7P2la3gA-uWScYnAc_gw8S2-LeRQc0O5SwQwo
To claim this, I am signing this object:
@SerCeMan
SerCeMan / repl.clj
Last active February 20, 2016 10:32
nREPL with default NS
(ns com.nda.myproduct
(:require
[clojure.tools.nrepl.server :as server]
[clojure.tools.nrepl.middleware :as middleware]
[clojure.tools.nrepl.middleware.session :as session]))
; util funcs
;...
(ns clj-systemf.core)
(def => :to)
(defn type
[term]
(:type (meta term)))
(defn deftype [name]
{:type :finite
@SerCeMan
SerCeMan / gist:f0f360bf543ad4523c55
Last active August 29, 2015 14:10
LaTeX to logitext converter
# Groovy
# For example, you can run it on groovyconsole.appspot.com
def s = /(\exists x P(x) \lor Q(x)) \to \exists x P(x) \lor \exists x Q(x)/
s = s.replace(/\vdash/, '|-')
s = s.replace(/\exists x/, 'exists x,')
s = s.replace(/\exists y/, 'exists y,')
s = s.replace(/\forall x/, 'forall x,')
s = s.replace(/\forall y/, 'forall y,')
s = s.replace(/\lor/, $/\//$)
@SerCeMan
SerCeMan / gist:876fcdfaca602af2df8d
Last active September 27, 2017 04:54
GcPermgenTest
package ru.serce.gctest;
import java.lang.reflect.Method;
import javassist.ClassPool;
import javassist.CtClass;
import javassist.CtMethod;
public class GcPermgenTest {
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
@SerCeMan
SerCeMan / gist:9228690
Created February 26, 2014 12:30
Find acquire connections
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* @author stselovalnikov
@SerCeMan
SerCeMan / My vimrc
Last active November 19, 2015 10:38
My vimrc
set nocp
set number
set ignorecase
set expandtab
set tabstop=4 " The width of a TAB is set to 4.
set shiftwidth=4 " Indents will have a width of 4
set softtabstop=4 " Sets the number of columns for a TAB
set autoindent
@SerCeMan
SerCeMan / Delete all inactive applications from NewRelic
Created December 6, 2013 05:11
JS script, which helps delete all inactive (gray) applications from NewRelic. Run script in JS console in Application view.
var yourId = 357957
var table = document.getElementById('apptable');
var rowLength = table.rows.length;
for(var i=1; i<rowLength; i+=1){
var row = table.rows[i];
var cellLength = row.cells.length;
if(row.cells[0].childNodes[0].getAttribute('alt') === 'Unavailable') {