Tuesday 11 June 2019

Download *.rpm for an offline Linux server

From a Linux box with Internet access, download the rpm.

yumdownloader docker --resolve

Copy the downloaded rpm to the offline server and install them.

rpm -ivh *rpm

Saturday 19 January 2019

Torn City - Higher Level Targets

This is more like a bookmark to me when I am not at home. This will serve as a good list of player who are higher level than me and likely to be the lower stats.

 



Good targets

 Darius

 -ichiGo-

 Jen

 Knight

 -Koe-

 -Razor-

 1035358

 1178211

 92182

 315330

 307913

 580912

 523173

 343770

 44139

 62186

 147113

 559070

 847641

 310430

 694764

 825088

 307082

 28786

 1596316

 1570666 Nice

 588903

 61518

 312777

 32056

 94982

 1424527

 592813

 1280215

 226324

 264553

 1040919

 48233

 953212

 116182

 41861

 4634

 496295

 115302

 255070

 219043

 231221

 578265

 442516

 425633

 189273

 70970

 579324

 675842

 57209

 71389

 525813

 354428

 264553

 70332

 842799

 153147

 248009

 289864

 338601

 138573

 314436

 90836

 949435

 558664

 1323743

 139168

 13370

 

 do not touch



New


83635 Nice
300312
593790
2029903 Nice, gain too low
1701877
2004821
1834033
449597
892675
1966099
1986248
1957100
1559915
1970445 Nice, 4.54
1819189
1591923 Nice, Fed
1606020
457692 Nice
1883474
1962748
1986990
857087
1883496
346139
2080083
1546881
1560475
26445 Not Nice
1209438
1370984
1261731 Nice, Not in Torn
309905 Nice
1068177
900145 Nice
33026 Nice, Not in Torn
267149 Nice
430360
63815 Nice
1178211 Nice
307913 Nice
343770 Nice
158464 Nice 4.15
489646 Nice 3.88
981697
190248 Nice, 4.08, hit back
1372690 Nice, 4.62
431356 Nice, 4.2
382663 Nice, 3.8, hit back
94982 Nice, 3.66
496295 Nice, 3.53
196532
211789 Nice, 4.79, 5.92
278290 Nice, 2.57
439782 Nice 3.82
1078182
59347 Nice, 3.47
140305 Nice, 4.02
338601 Nice
138573 Nice
105379
120743
638316
26912 Nice, 3.83
274028 Nice, 3.85
1209548 Nice, 4.85, 5.34
78442 Nice, 5.47
618225 Nice, 4.97
133708 Nice, 4.29
228123 Nice, 4.85
139168 Nice, 4.03
1323743 Nice, 3.66
161918
607100 Nice, 3.3
870855 Nice, 4.16
13278
149069 Nice
1282365 Nice, 4.71
228471 Nice, 5.22, hit back
661193
706142 Nice, 5.11, hit back
65426 Nice, 5.22
960840 Nice, 4.58, hit back
868753
519425
73070
1062284
1877752
167899
420123
585867 Nice, 6.08, hit back
175076
785385
28111 Lost
133650 Nice, 5.91
357657 Nice, 6.12
44533 Nice, 6.08, hit back
1190984 Nice, 6.03
237924
112522 Nice, 6.03
41943 Nice, 6.03, hit back
136956 Nice, 5.99, hit back
666989 Nice, 5.75
254114 Nice, 5.95, hit back
498625 Nice, 4.62
1404683 Nice, 4.01


Mission

98200 Nice, 3.98
467558 Nice, 4.34
1658431 Nice, 4.05
1608028 Nice, 4.11
162051 hit back, 4.14


Nice,
Nice,




mission active
1523814 Nice, 6.03

Torn City - Lower Level Targets

This is more like a bookmark to me when I am not at home. This will serve as a good list of player who are lower level than me and likely to be the lower stats.

Good targets same level

 183555

 300312   Nice

 1868019


183555
1868019
1868019
1928969
486575 Nice
1868019
1928969
486575 Nice
299136 Nice
795535
1584499 Nice
936846 Nice
1970445 Nice, Same faction
1631579
578767 Nice
1822480 Nice
881297 Nice
1857849 Nice
1884455
1046700
1686759
1953208 Nice
551121
775841
1150595 Nice
345727 Nice
1167814 Nice
111337
856684 Nice
1604584
1004500 Nice
951689
2080083
1026358 Nice
900145 Nice
1316692 Nice
1306618 Nice
903034 3.87
902604 Nice
2016121
551121
1046421
1114084 Nice
788423 Nice
957171 Nice
1954087
1978739
957171 Nice
560465
348080
334780 Nice
333843 Nice
859672 Nice
329793
139124
944949
1540401
434181 Nice
239202 Nice
749280 Nice
35782 Nice
330794 Nice
842799 Nice, 3.62
303620 Nice, 4.28
903034 Nice
212150
193
342978
131340
21116

Tuesday 17 January 2017

Faster login to Linux via SSH

It usually took a very long time to login my Linux VMs (CentOS 6, 7 and SuSE11 SP3) via SSH.

After some research, I've found the following.

RHEL 7
[abc@RHEL7 ~]# vi /etc/ssh/sshd_config
Set GSSAPIAuthentication no
[abc@RHEL7 ~]# service sshd restart

Other Linux distros
[abc@CentOS ~]# vi /etc/ssh/sshd_config
Set UseDNS no

[abc@CentOS ~]# vi /etc/resolv.conf
options single-request-reopen ;in the last line. No network restart required

I didnt even update resolv.conf part, it is working very fast for CentOS 7.2. It might be different on other distros.

Ref: https://access.redhat.com/discussions/1173853

Faster VM shutdown in VMWare player

Locate .vmx of the desired VM's folder. Open it using a text editor.

Add the following lines in the file (or update to the following if such attributes exist).

prefvmx.minVmMemPct = "100"
mainMem.useNamedFile = "FALSE"
mainMem.partialLazySave = "FALSE"
mainMem.partialLazyRestore = "FALSE"


Ref: http://davidmsterling.blogspot.sg/2012/08/vmware-virtual-machine-takes-long-time.html

Sunday 8 January 2017

Installing Scrapy in Windows 7 64-bit

It's been a long time that I want to try out some kind of program to crawl websites and extract info/data from them. Recently, I've tried powershell which had a decent outcome. However, it was not easy as the language was designed for some other purpose. Thus, I decided to check scarpy out.

The following would be the steps to install Scrapy in Windows 7 64-bit.


  1. It starts with the installation of Microsoft Visual C++ Compiler for Python 2.7 which is downloaded from Microsoft.
  2. Install Python 2.7.13 (using python-2.7.13.amd64.msi) which is downloaded from python.org.
  3.  Then install Python for Windows Extensions (using pywin32-220.win-amd64-py2.7.exe). 
  4. Once the installation is completed, the folder path that python is installed must be added to PATH environment variable in Windows.
  5. Check the installation and path added by checking python and pip versions in command prompt.
    python --version
    pip --version
  6. Once python and pip are displaying versions correctly, scrapy can be installed using
    pip install scrapy
  7. For me, the installation faces some issue when it looks for libxml related libraries.

        c:\users\admin\appdata\local\temp\xmlXPathInit_h2bpm.c(1) : fatal error C108
    3: Cannot open include file: 'libxml/xpath.h': No such file or directory
        ****************************************************************************
    *****
        Could not find function xmlCheckVersion in library libxml2. Is libxml2 insta
    lled?
        ****************************************************************************
    *****
        error: command 'C:\\Users\\admin\\AppData\\Local\\Programs\\Common\\Microsof
    t\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2

        ----------------------------------------
    Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\
    \users\\admin\\appdata\\local\\temp\\pip-build-g2zcer\\lxml\\setup.py';f=getattr
    (tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close()
    ;exec(compile(code, __file__, 'exec'))" install --record c:\users\admin\appdata\
    local\temp\pip-erwjed-record\install-record.txt --single-version-externally-mana
    ged --compile" failed with error code 1 in c:\users\admin\appdata\local\temp\pip
    -build-g2zcer\lxml\
  8. To resolve the above, steps in stackoverflow.com is followed. It has been suggested to download lxml-3.6.4-cp27-cp27m-win_amd64.whl and install it using this command.
    pip install lxml-3.6.4-cp27-cp27m-win_amd64.whl
  9. Once it is successfully installed, re-run pip install scrapy again. It should be successful now.
  10. Finally, tutorial from scrapy.org is run with results.

Hope it helps to install scrapy in Windows 7 64-bit.


Saturday 10 December 2016

Run task scheduler in command line

schtasks is used to create/run tasks in command line without the need to open "Task scheduler".

I've tried query and run parameters but not yet for create.

It is required to provide the task name including the folder that task is created in.

To query if a task exists
 >schtasks /query /tn "thelog"  
 ERROR: The system cannot find the file specified.  
 >schtasks /query /tn "Microsoft\thelog"  
 Folder: Microsoft  
 TaskName                 Next Run Time     Status  
 ======================================== ====================== ===============  
 thelog                  N/A          Ready  
 >schtasks /query /tn "Microsoft\the special log"  
 Folder: Microsoft  
 TaskName                 Next Run Time     Status  
 ======================================== ====================== ===============  
 the special log             N/A          Ready  

To run the task
 >schtasks /run /tn "Microsoft\thelog"  
 SUCCESS: Attempted to run the scheduled task "Microsoft\thelog".  
 >schtasks /run /tn "Microsoft\the special log"  
 SUCCESS: Attempted to run the scheduled task "Microsoft\the special log".  

It is needed to run tasks in elevated command prompt though.

IBM DSA utility to collect logs

A few command line switches can be used together with dsa to collect logs in different format.

When the executable is run without any parameters, it would save the log in XML format.

> ibm_utl_dsa_dsyte1d-9.61_portable_windows_x86-64.exe

To generate it in HTML format, -v must be used.

> ibm_utl_dsa_dsyte1d-9.61_portable_windows_x86-64.exe -v

To convert the log generated in XML to HTML format, the following command is used.
> ibm_utl_dsa_dsyte1d-9.61_portable_windows_x86-64.exe -v -x -i generated_log.xml.gz

To compare current log with previously collected one, -r switch with log files names together is used. Both logs must be generated using same version of DSA though.
> ibm_utl_dsa_dsyte1d-9.61_portable_windows_x86-64.exe -r generated_log_001.xml.gz generated_log_001.xml.gz -v


Saturday 12 March 2016

How to calculate to get an exact partition size

It is sometimes not great to see a partition size like 99.96GB or 100.30GB in My Computer. It is just not nice. I am a bit particular when it is about partition sizes. As Microsoft has chosen the way to partition using numbers in MB, it is always the issue, resulting in funny number of GB.

I used to go to a website and calculate the partition size but I unfortunately do not have access to it anymore. So, it has to be manual. This trick worked like a charm when I tried to resize a partition that was factory partitioned. I believe it would work for other situations as well.

What I did was for my 150GB partition after seeing someone's post in superuser.com.


Since I want a 150GB partition, I calculated like the following. 
(1024 x 150 ) + 4 = 153604

For every 1GB, it should be multiplied by 1024 and then 4MB should be added.

Mission accomplished finally. :)



Friday 4 March 2016

Download youtube clips (and subtitles)

youtube-dl. It is a small standalone executable file to download youtube clips and subtitles. I have no doubt this is a nice utility which does not have GUI unfortunately. So, one has to check the parameters for different download scenarios. I like to share the parameters I have tried successfully so far.

Download clip + subtitle
youtube-dl.exe --write-srt --sub-lang en https://www.youtube.com/watch?v=xxxxxxxxxxx

Download clip only
youtube-dl.exe https://www.youtube.com/watch?v=xxxxxxxxxxx

Download subtitle only
youtube-dl.exe --write-srt --sub-lang en --skip-download https://www.youtube.com/watch?v=xxxxxxxxxxx

--sub-lang may be replaced with desired language such as fr,es, and so on.