Skip to content

Instantly share code, notes, and snippets.

View dmitry-salnikov's full-sized avatar

Dmitry Salnikov dmitry-salnikov

View GitHub Profile

top (the UNIX process inspector) cheat sheet

This is a list of the most helpful keyboard commands I use within top.

The basics

h shows help on interactive commands. Also see the top manual page

q to quit the program.

@dmitry-salnikov
dmitry-salnikov / android_instructions.md
Created May 10, 2018 00:14 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@dmitry-salnikov
dmitry-salnikov / expecting.md
Created April 16, 2018 01:03 — forked from ksafranski/expecting.md
Basic principles of using tcl-expect scripts

Intro

TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl extension and a different #! call.

Setup Your Script

The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:

#!/usr/bin/expect
@dmitry-salnikov
dmitry-salnikov / disk-usage.sh
Created March 28, 2018 01:48
Get the size of docker container
#!/bin/bash
# disk-usage from docker-experiments
# https://github.com/rsp/docker-experiments
# by Rafał Pocztarski - https://github.com/rsp
if [ $# -ne 1 ]; then
echo "Usage: $0 \"image1 image2 ...\""
exit 1
fi
@dmitry-salnikov
dmitry-salnikov / build.sh
Created March 26, 2018 02:05 — forked from dzlab/build.sh
Configure NGINX to log HTTP POST request's body
#!/bin/bash
echo "Building NGINX along with Echo module"
# install prerequisites
yum -y install gcc gcc-c++ make zlib-devel pcre-devel openssl-devel
# download the Echo module
curl -L -O 'https://github.com/openresty/echo-nginx-module/archive/v0.58.tar.gz'
tar -xzvf v0.58.tar.gz && rm v0.58.tar.gz
mv echo-nginx-module-0.58 /tmp/echo-nginx-module
@dmitry-salnikov
dmitry-salnikov / LC_CTYPE.txt
Created March 18, 2018 00:15 — forked from thanksdanny/LC_CTYPE.txt
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@dmitry-salnikov
dmitry-salnikov / README.md
Created March 10, 2018 14:37 — forked from cstrelioff/README.md
a basic responsive page
@dmitry-salnikov
dmitry-salnikov / unxip.scpt
Created February 25, 2018 00:30 — forked from JScott/unxip.scpt
For unarchiving Apple's bad decisions
-- http://stackoverflow.com/questions/37812664/end-of-central-directory-signature-not-found-when-installing-xcode-8-beta-xip/37857162#37857162
on run argv
tell application "Archive Utility" to open POSIX path of (item 1 of argv)
repeat
delay 5
if application "Archive Utility" is not running then exit repeat
end repeat
end run
@dmitry-salnikov
dmitry-salnikov / IntelliJ_IDEA__Perf_Tuning.txt
Created January 18, 2018 03:52 — forked from P7h/IntelliJ_IDEA__Perf_Tuning.txt
Performance tuning parameters for IntelliJ IDEA. Add these params in idea64.exe.vmoptions or idea.exe.vmoptions file in IntelliJ IDEA. If you are using JDK 8.x, please knock off PermSize and MaxPermSize parameters from the tuning configuration.
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1
@dmitry-salnikov
dmitry-salnikov / DI.m3u
Created January 9, 2018 19:57 — forked from sim642/DI.m3u
Digitally Imported premium streams
#EXTM3U
#EXTINF:-1,Digitally Imported - Ambient
http://pub1.diforfree.org:8000/di_ambient_hi
#EXTINF:-1,Digitally Imported - Big Room House
http://pub1.diforfree.org:8000/di_bigroomhouse_hi
#EXTINF:-1,Digitally Imported - Breaks
http://pub1.diforfree.org:8000/di_breaks_hi