Lokvin Wiki
Register
Line 1: Line 1:
  +
==switch rcom dev env ==
  +
* switch network use rcom dns
  +
* switch maven settings.xml use rcom maven repo
  +
  +
 
==tips on thehub ==
 
==tips on thehub ==
 
https://thehub.thomsonreuters.com/docs/DOC-697156
 
https://thehub.thomsonreuters.com/docs/DOC-697156

Revision as of 08:37, 21 November 2014

switch rcom dev env

  • switch network use rcom dns
  • switch maven settings.xml use rcom maven repo


tips on thehub

https://thehub.thomsonreuters.com/docs/DOC-697156

tips on original wiki

http://10.90.22.6/reutersmediawiki/index.php/BjMediaDev/SelfDev/Yufei_Ren/Tips

foxyproxy addon set blacklist

Please note that all patterns -- white and black -- are ignored when FoxyProxy is set to "Use proxy ABC for all URLs".

dig

  • use dig command to find the domain ip
dig preview.cn.mobile.reuters.com
;; ANSWER SECTION:
preview.cn.mobile.reuters.com. 30 IN	A	167.206.188.34

check tomcat version

/opt/tomcat/bin/version.sh

clear apache disk cache

  • clear apache disk cache, you may find apache cache in folder like:
/rt/apache/cache

linux tips

ctrl + r

  • ctrl + r , search history command

screen

 1) screen -L -d -RR -S buildmaster;  -> Start a screen as the buildmaster user;
 #) screen -S screenName -> also start a new screen
 2) screen -x;  -> resume to last screen;
 #) screen -x yufei -> resume yufei screen
 #) sometime you can't attach to a screen, you may need chmod to 777
 #) screen -list -> check avaliable screen list
 3) ctrl-a d;   -> quit current screen, Detached;
 4) ctrl-a 1/2/3/4...;   -> switch in different window;
 5) ctrl-a c;   -> Create a new window in the screen;
 6) ctrl-a shift-A;  -> Change the window name in the screen;
 7) ctrl-a "  -> list all window
 8) ctrl-a [ + arrow key -> copy mode, can roll screen, press "Esc" exit from copy mode
 10)ctrl-a + K -> kill current window
 11)ctrl-a + ctrl-n -> move to next window
 12)ctrl-a + ctrl-Backspace -> move to previous window
 #) ctrl-a + a -> move cursor to the first character of line
 #) ctrl-e -> move cursor to the line end. 

screen guide : http://magazine.redhat.com/2007/09/27/a-guide-to-gnu-screen/

vi tips

lsof

  • Check specify process open files count
sudo /usr/sbin/lsof -p 16508 |wc -l

linux short cut key

curl

$ curl -D - -o /dev/null -H "User-Agent: iPhone" "http://cn.reuters.com/article/2014/03/26/idUSnMKW40mwTa+1c2+MKW20140326"
 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                Dload  Upload   Total   Spent    Left  Speed
 0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0HTTP/1.0 301 Moved Permanently
Server: Apache
Cache-Control: no-cache, no-store, must-revalidate
Location: http://cn.mobile.reuters.com/do/urlRedirect?    URL=http://cn.reuters.com/article%2f2014%2f03%2f26%2fidUSnMKW40mwTa%2b1c2%2bMKW20140326
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 263
Content-Type: text/html; charset=iso-8859-1
Date: Wed, 07 May 2014 03:23:01 GMT
X-Cache: MISS from agency_dtc_proxy
Proxy-Connection: keep-alive
100   263  100   263    0     0    423      0 --:--:-- --:--:-- --:--:--   811

Chrome tips

view source

  • ctrl + u, check chrome source code (win, linux)
  • option + command + u, view source (Mac)

open developer tools

  • f12, open chrome develop tools (win, linux)
  • option + command + i , (mac)

chrome full screen

  • f11, chrome full screen (win, linux)
  • ctrl + command + f , chrome full screen (mac), shift + command + f , presentation mode (mac)

akamai staging

How to test using Akamai's Staging Network

Applies To

Description

How do I test using Akamai's Staging Network?

Akamai's Staging Network allows Akamai's customers to test configuration changes prior to going live on the Production Network. How exactly does one test from Staging?

Testing involves two steps: first, find a Staging IP, and second, spoof your domain to this IP and test whether or not your site or application behaves as expected.

1) Here is how you find an Akamai Staging IP. Say, Akamai is serving your digital property www.foo.com. Typically, this digital property would be cnamed to an Edge Hostname such as www.foo.com.edgesuite.net or www.foo.com.edgekey.net.

(Note, if this is a new property that has not been Akamaized yet, this cname may not be in place yet. In this case, you will have to create an Edge Hostname to which you will be cnaming prior to running this test.)

$ dig www.foo.com
;; ANSWER SECTION:
www.foo.com. 7200 IN CNAME www.foo.com.edgesuite.net.
www.foo.com.edgesuite.net. 1359 IN CNAME a1234.g.akamai.net.

To find a Staging IP, add "-staging" to your Edge Hostname as follows:

www.foo.com.edgesuite-staging.net or www.foo.com.edgekey-staging.net

Resolve the newly obtained hostname to find a Staging IP.

$ dig www.foo.com.edgesuite-staging.net
;; ANSWER SECTION:
www.foo.com.edgesuite-staging.net. 1264 IN CNAME a1234.g.akamai-staging.net.
a1234.g.akamai-staging.net. 20 IN A 165.254.92.146 a1234.g.akamai-staging.net. 20 IN A 165.254.92.138

The "-staging" Edge Hostnames are created automatically when the Production Edge Hostnames "www.foo.com.edgesuite.net" or "www.foo.com.edgekey.net" are created. As with production Edge Hostname, the "-staging" Edge Hostnames resolve to optimal Staging IPs.

2) Once you have found a Staging IP, spoof www.foo.com to this IP and test your site or application as you would in Production. You can spoof by entering this domain and IP in your hosts file, or use testing tools such as curl, wfetch, or Akamai's homegrown tool EdgeSuite Booster available to download under Tools on the Luna Control Center.

Testing on Staging is strongly recommended when you make your own changes to your configuration. It is required when a change is implemented by Akamai.

You may also want to make sure that once you have correctly spoofed to the staging network, that your test requests are in fact going through it. KB Article 4856 explains these validation steps in further detail.

If you are trying to perform functional or A/B testing for users in China on a property subscribed to China CDN Service, KB 4651 describes special considerations for that testing scenario.

rcom tips

rcom tips - rcom tips