Skip to content

Instantly share code, notes, and snippets.

View zhovner's full-sized avatar
🐋

Pavel Zhovner zhovner

🐋
View GitHub Profile
set const
set historylog
set nohelp
set nowrap
set suspend
set undo
include "/usr/share/nano/nanorc.nanorc"
include "/usr/share/nano/c.nanorc"
include "/usr/share/nano/css.nanorc"
include "/usr/share/nano/debian.nanorc"

Keybase proof

I hereby claim:

  • I am zhovner on github.
  • I am zhovner (https://keybase.io/zhovner) on keybase.
  • I have a public key whose fingerprint is 61C0 51E3 7F9C F69F 203E A461 20C1 83F8 3DBA 0E63

To claim this, I am signing this object:

Device #1: Hawaii, 3072MB, 1000Mhz, 44MCU
Device #2: Hawaii, 3072MB, 1000Mhz, 44MCU
Device #3: Hawaii, 3072MB, 1000Mhz, 44MCU
Device #4: Hawaii, 3072MB, 1000Mhz, 44MCU
Hashtype: MD4
Workload: 1024 loops, 256 accel
Speed.GPU.#1.: 22029.8 MH/s
Speed.GPU.#2.: 22070.9 MH/s
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>prehensile.networkwatcher</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/python</string>
@zhovner
zhovner / openssl.sh
Last active December 11, 2015 16:08
OpenSSL exampels
# Расшифровать ключ
openssl rsa –in enc.key -out dec.key
# Сравнить фингерпринты
openssl rsa -noout -modulus -in /rsa.key
openssl x509 -noout -modulus -in /crt.crt
# Вся инфа о сертификате
openssl x509 -in /cert.pem -noout -text
@zhovner
zhovner / netknife.py
Last active December 11, 2015 20:58
Python network
# Validate IP address
import socket
def valid_ip(ipaddress):
try:
socket.inet_aton(ipaddress)
return True
except:
return False
@zhovner
zhovner / hdparm.sh
Created February 1, 2013 19:25
Disk write speed
# test disk write speed
dd if=/dev/zero of=/tmp/output.img bs=8k count=256k
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
if [ ! "$TMUX" ]; then
tmux attach
fi
# Simple python mailer
# How to use: mailer('subject', 'mail@address', bodyvar)
from subprocess import *
def mailer(MailerSubject, RecipientAddress, MailBody):
readBody = Popen(["/bin/echo", MailBody], stdout=PIPE)
mail = Popen(["/usr/bin/mail", "-s", MailerSubject, RecipientAddress], stdin=readBody.stdout, stdout=PIPE)
output = mail.communicate()[0]
@zhovner
zhovner / SublimeTerm.terminal
Created July 28, 2013 20:45
SublimeText theme for Terminal.app
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBrightBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
LjQ1ODgyMzU2MTcgMC40NDMxMzcyODgxIDAuMzY4NjI3NDU4OAAQAoAC0hAREhNaJGNs
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp