Search This Blog

Friday, August 8, 2014

Swap usage by PID


#> for i in `find /proc -maxdepth 1 -type d|xargs -i basename {}`; do echo -n "PID: $i SWAP: "; cat /proc/$i/smaps|fgrep Swap|awk '{s=s+$2}END{print s}'; done|sort -k4n

WINE + winetricks + WoT + Steam

Small note about installation and configuration process

#> WINEARCH=win32 winecfg

#> wget http://winetricks.org/winetricks
#> chmod +x winetricks
#> sudo cp winetricks /usr/local/bin

#> cd .wine/drive_c/
#> winetricks  d3dx9_36 vcrun2008 corefonts wininet msls31
#> winetricks  msxml3
#> winetricks  ie8

#> wine  WoT_internet_install_ru.exe
#> winecfg
Libraries:  Add: msvcp110 (native, buildin), msvcr110 (native, buildin)

#> wine msiexec /i SteamInstall.msi
#> wine Steam/Steam.exe -no-dwrite

Wednesday, August 6, 2014

SQLite...


Client configuration - rc file for sqlite3
~/.sqliterc
.headers ON
.timer ON



Create table with autoincrement primary key - id

CREATE TABLE table_name (id INTEGER PRIMARY KEY AUTOINCREMENT);


Order of field option important, don't swap it.

Friday, August 1, 2014

Xorg - adding undetected resolutions


Due to buggy hardware or drivers, your monitor's correct resolutions may not always be detected. For example, the EDID data block queried from your monitor may be incorrect.
If the mode already exists, but just isn't associated for the particular output, you can add it like this:
  • $ xrandr --addmode S-video 800x600
If the mode doesn't yet exist, you'll need to create it first by specifying a modeline:
  • $ xrandr --newmode <Mode``Line>
You may create a modeline using the gtf or cvt utility. For example, if you want to add a mode with resolution 800x600 at 60 Hz, you can enter the following command: (The output is shown following.)
  • $ cvt 800 600 60
    # 800x600 59.86 Hz (CVT 0.48M3) hsync: 37.35 kHz; pclk: 38.25 MHz
    Modeline "800x600_60.00"   38.25  800 832 912 1024  600 603 607 624 -hsync +vsync
Then copy the information after the word "Modeline" into the xrandr command:

$ xrandr --newmode "800x600_60.00"   38.25  800 832 912 1024  600 603 607 624 -hsync +vsync