Skip to content

Instantly share code, notes, and snippets.

View kovyrin's full-sized avatar

Oleksiy Kovyrin kovyrin

View GitHub Profile
@rednaxelafx
rednaxelafx / DirectMemorySize.java
Created January 11, 2012 07:18
An Serviceability-Agent based tool to see stats of NIO direct memory, as an alternative on JDK6 without JMX support for direct memory monitoring. Only works on JDK6; to work on JDK7 will need some tweaking because static variables are moved to Java mirror
import java.io.*;
import java.util.*;
import sun.jvm.hotspot.memory.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.tools.*;
import sun.jvm.hotspot.utilities.*;
public class DirectMemorySize extends Tool {
@mrflip
mrflip / 20130416-todo.md
Last active January 21, 2024 21:06
Elasticsearch Tuning Plan

Next Steps

  • Measure time spend on index, flush, refresh, merge, query, etc. (TD - done)
  • Take hot threads snapshots under read+write, read-only, write-only (TD - done)
  • Adjust refresh time to 10s (from 1s) and see how load changes (TD)
  • Measure time of a rolling restart doing disable_flush and disable_recovery (TD)
  • Specify routing on query -- make it choose same node for each shard each time (MD)
  • GC new generation size (TD)
  • Warmers
  • measure before/after of client query time with and without warmers (MD)
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
@aaronpenne
aaronpenne / tips_how_to_succeed_ee_ece.md
Last active August 23, 2023 18:59
Tips on How To Succeed in an EE or ECE Major

This is ECE advice on how to study and succeed in school. This is a long list (copied from my Reddit post on r/ece) of things I learned over 6 years as an ECE undergraduate and masters student. Some tips are pulled from other places on this sub and around Reddit. This list is not comprehensive, has typos, and is obviously biased by personal taste... so if you have something to add please do so!

I am currently an electrical engineer at a large aerospace company, and am finishing finished my master's in ECE. I am was a TA for an introductory circuits course and want to give the students some tips. These are things I wish I knew when I was at their stage.

I am on Twitter nowadays, hit me up if you are struggling and I'll try to help out!

If you do some of these, you'll be better off. It's not a laundry list of everything you should do, it's just a reference if you need some tips. H

@phobos182
phobos182 / haproxy.conf
Created July 17, 2012 23:19
LogStash Configuration for HAProxy
input {
syslog {
type => "haproxy-access"
port => 514
}
}
filter {
grok {
type => "haproxy-access"
@jeffdevine
jeffdevine / good_luck.rb
Last active March 9, 2023 19:31
Friday Deploy for Capistrano 2.x
before 'deploy', 'deploy:good_luck'
before 'deploy:migration', 'deploy:good_luck'
task :good_luck, roles: :app, except: { no_release: true } do
if Time.now.wday == 5
logger.debug('')
logger.debug('┓┏┓┏┓┃')
logger.debug('┛┗┛┗┛┃\○/')
logger.debug('┓┏┓┏┓┃ / Friday')
logger.debug('┛┗┛┗┛┃ノ)')
@mrflip
mrflip / tuning_storm_trident.asciidoc
Last active May 27, 2022 23:59
Notes on Storm+Trident tuning

Tuning Storm+Trident

Tuning a dataflow system is easy:

The First Rule of Dataflow Tuning:
* Ensure each stage is always ready to accept records, and
* Deliver each processed record promptly to its destination
#
# Cookbook Name:: yumrepo
# Definition:: yumrepo
#
# Copyright 2010, Tippr Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@silentbicycle
silentbicycle / handwarmer.c
Created January 2, 2014 17:53
handwarmer.c
/*
* Copyright (c) 2014 Scott Vokes <vokes.s@gmail.com>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
@julik
julik / unfuck_osx_readline_for_ruby.txt
Created August 24, 2011 13:10
Decent Readline support for irb/pry on Leopard and above for decent UTF8 input, with RVM
Ensure that your ~/.inputrc contains this
set convert-meta off
set input-meta on
set output-meta on
Install the REAL GNU readline from source
$ curl ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz | tar xfz - && cd readline-6.2 && ./configure --enable-multibyte && make && sudo make install