osobni stranka plna nesmyslu


leave a comment »

Tweaking Putty

  • Session – SSH – Close window on exit: Never
  • Window – Lines of scrollback: 20000
  • Window > Appearance – Deja Vu Sans Mono (8 pt)
  • Window > Translation – UTF-8
  • Window > Colours – ANSI Blue: Red:74 Green:74 Blue:255
  • Connection – Seconds between keepalives (0 to turn off): 25
  • Connection > Data – Terminal details – Terminal-type string: putty-256color or linux


  • Total Commander
  • 3CDaemon – TFTP, FTP, Syslog server
  • adwcleaner, malware bytes, microsoft safety scanner
  • Wireshark – network analyzer
  • cleanmem – full memory with wireshark etc
  • cpu-z – hw info
  • sysinternal tools – process explorer/monitor
  • UNetbootin – create Live CD
  • GParted – modify partitions
  • MiniTool Partition Wizard Free – migrate HDD -> SSD, it is able to resize partitions (clonezilla cannot do that)
  • SnapTimer – simple and free countdown timer
  • Windows command certutil (certutil -hashfile .\file.exe SHA256), HashAlgorithm choices: MD2 MD4 MD5 SHA1 SHA256 SHA384 SHA512 (was: FCIV – freeware md5 and sha1 hash from Microsoft)
  • Sumatra PDF – minimal pdf reader
  • – youtube downloader

Android Studio:

  • File – Settings – Editor – General – Auto Import
    • enable Show import popup in XML section and Java section
    • tick Add unambiguous imports on the fly in Java section
  • activity_main.xml: app/res/layout/activity_main.xml
  • app/java/
  • styles.xml: app/res/values/styles.xml
  • strings.xml: app/res/values/strings.xml or for localized cs version: app/res/values-cs/strings.xml
  • CTRL + ALT + L – Reformat Code
  • CTRL + B – click on some method or variable, and then CTRL+B will show you the declaration
  • CTRL + / – comment out selected lines
  • logging:
    • TextView tv3 = (TextView) findViewById(;
    • Log.i("Cookie app",tv3.getText().toString());


Volume on mouse – scroll up/down

C:\Program Files (x86)\Kodi\system\keymaps\mouse.xml (you must have admin rights, so e.g. copy this file somewhere, edit it there and copy it back to the folder)


Granularity of changing volume on mouse (if you scroll down, the amount of changed volume is low). From

      <wheelup>RunScript(“C:\Program Files (x86)\Kodi\system\keymaps\”, “up”)</wheelup>
      <wheeldown>RunScript(“C:\Program Files (x86)\Kodi\system\keymaps\”, “down”)</wheeldown>

Install python, e.g.

In folder C:\Program Files (x86)\Kodi\system\keymaps\, create

import json, xbmc
rpc = '{"jsonrpc": "2.0", "method": "Application.GetProperties", "params": {"properties": ["volume"]}, "id": 1}'
vol = json.loads(xbmc.executeJSONRPC(rpc))["result"]["volume"]
xbmc.executebuiltin('SetVolume(%d,showVolumeBar)' % (vol + 15))


import json, xbmc
rpc = '{"jsonrpc": "2.0", "method": "Application.GetProperties", "params": {"properties": ["volume"]}, "id": 1}'
vol = json.loads(xbmc.executeJSONRPC(rpc))["result"]["volume"]
xbmc.executebuiltin('SetVolume(%d,showVolumeBar)' % (vol - 15))

Social life:

pisnicka: zkouskove obdobi, uryvek z textu: “doktor z hor” – Common Errors in English Usage

Cartridge do tiskarny – C1C, 217C1910, Canon 15, BCI-15 Black, Made in Japan, Ink Tank

Oddily v linuxu:

  • primary – 100MB, beginning, EXT4, /boot
  • logical – 3500MB (2xRAM), beginning, swap area
  • logical – 6000MB (for installation, 4000MB should be enough), beginning, EXT4, /
  • logical – how much I want (usually the rest), beginning, EXT4, /home

Ignore case

  • vim – /\cCase Insensitive Search
  • less – less sth.tex and then type -i

Directory colors for bash in Centos

  • vim /etc/DIR_COLORS
  • change line with DIR to 0;35 which is purple


Timelapse, image taken every 5s

Rename images via Total Commander, File – Multi-Rename Tool so it begins with 0001.JPG (%04d.JPG). I found those parameters to best suit my needs (36s video has 78MB):

ffmpeg -r 60 -start_number 1 -i %04d.JPG -s 1920×1080 -vcodec libx264 -crf 18 -preset ultrafast -tune stillimage video.mp4



2-pass x264 (bitrate 2048kb)

ffmpeg -i input -pass 1 -vcodec libx264 -vpre slow -b 2048k -f avi -an -y /dev/null && ffmpeg -i input -pass 2 -vcodec libx264 -vpre slow -b 2048k -acodec libmp3lame output.avi

Video encoding (decrease size of file)

this package must be installed first: sudo apt-get install libavcodec-unstripped-52

ffmpeg -i input -acodec libmp3lame -vcodec libxvid -r 25 -b 1800k -s 640×480 -aspect 4:3 out.avi


ffmpeg -i input -acodec libmp3lame -ab 320k -vcodec libxvid -qscale <1-31> -s 1280×720 output.mp4

-qscale is variable bitrate quality, 1: highest quality; 31: lowest quality; qscale higher than 13 yields very poor quality

  • qscale 9 – bitrate 1700 – 1840 kbits/s
  • qscale 4 – bitrate 3000 kbits/s
  • qscale 3 – bitrate 5400 kbits/s


ffmpeg -i input -acodec libmp3lame -ab 320k -vcodec libx264 -vpre ultrafast -b 3500k -s 1280×720 output.avi

presets are stored in /usr/local/share/ffmpeg


Send email when someone logs (CentOS 6.8)

Written by cloudovka

2014/06/03 at 10:58 pm

Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: