Tuesday, May 27, 2014

get full hostname and domain name







check-hostname | awk '{ print $NF }'

domainname



Thursday, May 22, 2014

Keep your Facebook friends close






Keep your Facebook friends close — and your enemies closer
Friend of Foe: FoF





Basic types of Unix shell






If that's not the case, next time you got a command that you're not sure
about (from a script for example), paste it to explainshell.com. It may
be quicker to learn shell this way.




Ref: http://unixhelp.ed.ac.uk/shell/oview2.html

Friday, May 2, 2014

Link to X services






facebook friends: Phuong Khanh TaoVui PVCuong77 Nil MacXinh AjiIkeya diepnv.epu nqlamtung nguyen.vantuyen.50364

n04cogo88mdb@m.youtube.com


Link to youtubeGoogle+

Wednesday, April 30, 2014

Apple check serial number status










Check Your Service and Support Coverage

Review your Apple warranty status and eligibility for support and extended coverage.

Link https://selfsolve.apple.com/agreementWarrantyDynamic.do or shotcut




Monday, April 28, 2014

Apple iCloud setup for Thunderbird









Mail server settings

Refer to your email app's documentation for information about how to use these settings. iCloud Mail uses the IMAP and SMTP standards supported by most modern email apps. iCloud does not support POP.

IMAP information for the incoming mail server

  • Server name: imap.mail.me.com
  • SSL Required: Yes
    If you receive errors when using SSL, try using TLS instead.
  • Port: 993
  • UsernameThe name part of your iCloud email address (for example, emilyparker, not emilyparker@icloud.com)
  • PasswordYour iCloud password

SMTP information for the outgoing mail server

  • Server name: smtp.mail.me.com
  • SSL Required: Yes
    If you receive errors when using SSL, try using TLS or STARTTLS instead.
  • Port: 587
  • SMTP Authentication Required: Yes
  • UsernameYour full iCloud email address (for example, emilyparker@icloud.com, not emilyparker)
  • PasswordYour iCloud password
Ref: http://support.apple.com/kb/ht4864?viewlocale=fr_fr

Thursday, April 24, 2014

KB2919355 for Windows 8.1






Windows 8.1 Update for x64-based Systems

  1. To start the download, click the Download button and then do one of the following, or select another language from Change Language and then click Change.
    • Click Run to start the installation immediately.
    • Click Save to copy the download to your computer for installation at a later time.
  2. These KB's must be installed in the following order: KB2919442, KB2919355, KB2932046, KB2959977, KB2937592, KB2938439, and KB2934018.
  3. KB2919442 is a prerequisite for Windows 8.1 Update and should be installed before attempting to install KB2919355


Ref: http://www.microsoft.com/en-us/download/confirmation.aspx?id=42335



Wednesday, April 16, 2014

Install Telnet Client by using a command line









pkgmgr /iu:"TelnetClient"


Applied to Windows 7, Windows Server 2008 R2, Windows Server 2008 or Windows Vista



Package Manager Command-Line Options

The following command-line options are available for Package Manager.
pkgmgr.exe [/?] [/h] [/help] [/l:file_name] [/ip] [/iu:Windows_feature_name] [/m:package_directory] [/n:answer_file] [/norestart] [/o:system_drive_pathoffline_Windows_directory_path] [/p:package_name] [/quiet] [/s:sandbox_directory] [/up:package_name] [/uu:Windows_feature_name]
Ref: http://technet.microsoft.com/en-us/library/cc749465(v=ws.10).aspx


Tuesday, April 15, 2014

"Clock skew detected" issue







Clock skew detected
Warning: File `main.cpp' has modification time 381 s in the future make: warning: Clock skew detected. Your build may be incomplete.

the message "Clock skew detected" is most commonly given if compiling sources located on an NFS mount and the NFS server's clock runs ahead the client's clock doing the compilation.
A possible solution is to "touch" every file in the source tree in order to update timestamps: go to the root of the subtree an do "find . -exec touch {} \; "

Then "make clean"and retry compilation



PCmover: free data transfer from WinXP to Win8.1







Laplink PCmover Express for Windows XP is an easy way to move your files, settings and user profiles from your old Windows XP computer to your new Windows PC
http://www.microsoft.com/windows/en-us/xp/transfer-your-data.aspx




Tuesday, April 8, 2014

Outlook 2010: MobileMe Services issue









MobileMe Services has encountered a problem

then I am prompted to send an error report (2x) then I am into Outlook and can work normally.


In the end, I simply renamed C:\Program Files\Common Files\Apple\Mobile Device Support\OutMMe32.dll to OutMMe32.dll.orig



Friday, April 4, 2014

C shell basic







The C Shell recognizes the following operators, in order of precedence.

     ()       - parenthesis - change order of evaluation
     -        - unary minus/negation
     ~        - one's complement
     !        - logical negation
     %        - remainder
     /        - divide
     *        - multiply
     -        - subtract
     +        - addition
     >>       - shift right
     <<       - shift left
     >        - greater than
     <        - less than
     >=       - greater than or equal
     <=       - less than or equal
     !=       - not equal to (strings)
     ==       - equal to (strings)
     &        - bitwise AND 
     ^        - bitwise exclusive OR
     |        - bitwise inclusive OR
     &&       - logical AND
     ||       - logical OR

Ref: 1 2



Wednesday, April 2, 2014

Alias server name for SSH








Use file ~/.ssh/config
example content:
Host altonjuve
    HostName 
    User alton



Friday, March 28, 2014

tcpdump:: how to







tcpdump -i tap24 -lnXXvs0 udp port 15001
tcpdump -r /tmp/cpub -lnXXvs0 udp port 6003|less
tcpdump -i eth1 -lnXXvs0 vlan 1169 -w /tmp/12345
tcpdump -lnvs0 vlan 1169 -r /tmp/12345|less
tcpdump -lnvXvs0 vlan 1169 -r /tmp/12345|less
tcpdump  -r /tmp/1234 -lnXXvs0|strings
/550 to search 550

/usr/sbin/tcpdump -r /tmp/zzzz -ln
/usr/sbin/tcpdump -r /tmp/zzzz -ln|grep -v 20002
/usr/sbin/tcpdump -r /tmp/zzzz -ln|less
/usr/sbin/tcpdump -r /tmp/zzzz -ln tcp|less

/usr/sbin/tcpdump -r /tmp/zzzz -ln tcp|tail
tcpdump -s 0 -w /tmp/zzzz -i br13 -ln
tcpdump -i eth4 -w /tmp/abc tcp port 12345





Tuesday, March 18, 2014

strace to help debug issues





good to see: 1 2 good
Strace monitors the system calls and signals of a specific program. It is helpful when you do not have the source code and would like to debug the execution of a program. strace provides you the execution sequence of a binary from start to end.






Thursday, December 5, 2013

Running UNIX shell commands from vim










To run a single UNIX command use the command:
   :!UNIX_command
You can start a shell from within vi and use it as you would your usual UNIX environment, then exit the shell and return to vi
To start up a shell enter the command:
   :sh
The type of shell that is started is determined by the $SHELL variable. You can specify that some other shell is to be started by setting the vi shell option
Return to using vi by entering the command exit or Ctrl-D


Shell Functions



:! cmdExecutes shell command cmd; you can add these special characters to indicate:% name of current file# name of last file edited
!! cmdExecutes shell command cmd, places output in file starting at current line
:!!Executes last shell command
:r! cmdReads and inserts output from cmd
:f fileRenames current file to file
:w !cmdSends currently edited file to cmd as standard input and execute cmd
:cd dirChanges current working directory to dir
:shStarts a sub-shell (CTRL-d returns to editor)
:so fileReads and executes commands in file (file is a shell script)
!Motion_cmdSends text from current position to Motion Command to shell command cmd
!}sortSorts from current position to end of paragraph and replaces text with sorted text

Displaying vi option values

To display the current value of all options enter the command:
:set all
To display the value of those options whose values have been reset from their default enter the command:

:set


Change an option value temporarily

To change a the value of an option temporarily:
   :set option_name
or:
   :set option_name=value

This sets the value of the option until you quit vi.

Change an option value permanently

To make a lasting change, create a file named .exrc, containing the set commands, in your home directory. The next time you use vi these options will take effect and will remain in force until you edit the .exrcfile to change them.

You can, of course, temporarily change the value of any option.

Examples of setting vi options permanently

1. To set a number of options place the set commands in the file .exrc.
   set ic
   set number
   set sh=/usr/local/bin/Tcsh
   set wm=5
This sets vi to:
   - ignore the case of characters in searches
   - display line numbers
   - use the TC shell to execute UNIX commands
   - wrap text five characters from the right edge
     of the screen
2. Options can also be set using the environment variable EXINIT.
   setenv EXINIT 'set ic number sh=/usr/local/bin/Tcsh wm=5'
For the C and TC shell user, this sets the same options as in the example above.

If there is a .exrc file owned by you in your home directory or the current directory, vi will take its option values from this and not from the EXINIT environment variable.

Friday, November 1, 2013

hosts for facebook












173.252.100.26 facebook.com
173.252.100.26 www.facebook.com
173.252.100.26 www.login.facebook.com
173.252.100.26 login.facebook.com
173.252.100.26 apps.facebook.com
173.252.100.26 register.facebook.com
173.252.100.26 vi-vn.connect.facebook.com
173.252.100.26 vi-vn.facebook.com
173.252.100.26 static.ak.connect.facebook.
173.252.100.26 error.facebook.com
173.252.100.26 register.facebook.com
173.252.100.26 bigzipfiles.facebook.com
173.252.100.26 pixel.facebook.com
173.252.100.26 upload.facebook.com
173.252.100.26 graph.facebook.com
173.252.100.26 developers.facebook.com
173.252.100.26 blog.facebook.com
173.252.100.26 channel.facebook.com
173.252.100.26 connect.facebook.com


Friday, October 25, 2013

winsxs folder








How to move the WinSxS (Windows Side-by-Side) folder in Win 7

Please use winsxslite



Thursday, October 24, 2013

Changing your hosts file in Vista









C:\Windows\System32\drivers\etc
+ hosts

Properties | Security | Edit

# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host
173.252.110.27 facebook.com
69.171.247.29 www.facebook.com
173.252.100.27 login.facebook.com
66.220.152.19 upload.facebook.com
66.220.152.19 graph.facebook.com
173.252.100.27 pixel.facebook.com
173.252.112.23 apps.facebook.com


Tuesday, September 10, 2013

Labels