Skip to content

Instantly share code, notes, and snippets.

View tyrnov's full-sized avatar

Artem Tyrnov tyrnov

  • Saint-Petersburg, Russia
View GitHub Profile
# Job metadata
job.name=PullFromWikipediaToKafka
job.group=Wikipedia
job.description=Pull from Wikipedia and write to Kafka
# Schedule
job.schedule=0 0/2 * * * ?
# Source configuration
extract.namespace=gobblin.example.wikipedia

mdadm

Glossary:

  • md: multiple devices
command description
cat /proc/mdstat show status of all raids
mdadm --detail /dev/md0 detailed status of raid md0
#!/bin/sh
DEBIAN_FRONTEND="noninteractive" apt-get -q update && apt-get install -y --force-yes --no-install-recommends --auto-remove "$@" && apt-get -q clean && rm -rf /var/lib/apt/lists/*
@tyrnov
tyrnov / gist:9bfbe10fd45d54b7d2b506a3accf8d1c
Created November 25, 2016 09:30
dump_memory_nginx_process.sh
# Set pid of nginx master process here
pid=8192
# generate gdb commands from the process's memory mappings using awk
cat /proc/$pid/maps | awk '$6 !~ "^/" {split ($1,addrs,"-"); print "dump memory mem_" addrs[1] " 0x" addrs[1] " 0x" addrs[2] ;}END{print "quit"}' > gdb-commands
# use gdb with the -x option to dump these memory regions to mem_* files
gdb -p $pid -x gdb-commands
# look for some (any) nginx.conf text
package main
import (
"errors"
"log"
"net/http"
"net/url"
)
type checkURL url.URL
@tyrnov
tyrnov / wlist.md
Last active February 1, 2018 11:15
Wishlist

VINYL

  1. David Lynch, Chrysta Bell - This Train
  2. Nick Cave and The Bad Seeds - Push The Sky Away
  3. Nick Cave and The Bad Seeds - The Skeleton Tree
  4. Tom Waits - The Heart of Saturday Night
  5. Leonard Cohen - You Want It Darker
  6. A Tribe Called Quest - People's Instinctive Travels And The Paths Of Rhythm (2 LP)
  7. Portishead - Third
  8. Portishead - Dummy
@tyrnov
tyrnov / clckhs.sh
Last active October 28, 2016 11:23
clckhs.sh
yum -y install git cmake wget bzip2 clang
yum -y install unixODBC-devel* openssl-devel* readline-devel* glib2-devel* libicu*
yum -y install mysql++-devel* libodb-mysql-devel* libssh-devel* libssh2-devel.* libffi*
yum -y install openssl-static libtool-ltdl-devel readline-static
export THREADS=$(grep -c ^processor /proc/cpuinfo)
export DISABLE_MONGODB=1
export CC=gcc-5
export CXX=g++-5
export LD_LIBRARY_PATH=/usr/lib64:/usr/local/lib64:/usr/local:/usr/local/lib/mysql:/usr/lib:$LD_LIBRARY_PATH