Skip to content

Instantly share code, notes, and snippets.

Alexandr Mitev bessangel

Block or report user

Report or block bessangel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
yukaizhao /
Created Oct 7, 2015
nio client example
package cn.outofmemory.hello.nio;
import java.nio.ByteBuffer;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
leventov /
Created Sep 4, 2014
См. Инструкция по применению в первом комментарии
import json
with open('{}.json'.format(MIN_STARS)) as json_file:
repos = json.load(json_file)
repos_by_language = {}
by_top = {}
for repo in repos:
morhekil / nginx.conf
Created Aug 14, 2014
Full request/response body logging in nginx
View nginx.conf
http {
log_format bodylog '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" $request_time '
'<"$request_body" >"$resp_body"';
lua_need_request_body on;
set $resp_body "";
body_filter_by_lua '
View Bootstrap-EC2-Windows-CloudInit.ps1
# Windows AMIs don't have WinRM enabled by default -- this script will enable WinRM
# AND install 7-zip, curl and .NET 4 if its missing.
# Then use the EC2 tools to create a new AMI from the result, and you have a system
# that will execute user-data as a PowerShell script after the instance fires up!
# This has been tested on Windows 2008 SP2 64bits AMIs provided by Amazon
# Inject this as user-data of a Windows 2008 AMI, like this (edit the adminPassword to your needs):
# <powershell>
# Set-ExecutionPolicy Unrestricted
jpawlowski / msys_hetzner-etc_network_interfaces
Created Aug 12, 2012
Debian network configuration for Proxmox VE server running on a Hetzner host
View msys_hetzner-etc_network_interfaces
# /etc/network/interfaces
auto lo
iface lo inet loopback
# device: eth0
iface eth0 inet manual
# IPv4 bridge
# (connect ONLY your firewall/router KVM instance here, this is the WAN device!)
bessangel / mtop
Created Jun 16, 2011 - mysql top
View mtop
if [ ! -z $1 ]; then
export MTOPU="-uroot"
export MTOPPW="-p$1"
if [ -f /root/.my.cnf ]; then
if [ -z $MTOPU ] && [ -z $MTOPPW] && [ $MTOPU != ' ' ]; then
View gist:353184
# Перекодирует рекурсивно в текущем каталоге имена
# файлов и каталогов в транслит.
shopt -s nullglob
for NAME in * ; do
TRS=`echo $NAME | sed "y/абвгдезийклмнопрстуфхцы /abvgdezijklmnoprstufxcy_/"`
You can’t perform that action at this time.