Sep 232017
 
aws route53 change-resource-record-sets --hosted-zone-id $(aws route53 list-hosted-zones | grep -B 1 '"xiehang.com."' | grep '"Id"' | cut -f 4 -d \" | cut -f 3 -d /) --change-batch file://<(echo '{"Changes":[{"Action": "DELETE","ResourceRecordSet":' $(aws route53 list-resource-record-sets --hosted-zone-id $(aws route53 list-hosted-zones | grep -B 1 '"xiehang.com."' | grep '"Id"' | cut -f 4 -d \" | cut -f 3 -d /) --query "ResourceRecordSets[?Name == 'to-be-deleted.xiehang.com.']" --max-items 1| egrep -v '^\[|^\]')'}]}')

Or as a script:

ZONE_ID=$(aws route53 list-hosted-zones | grep -B 1 '"xiehang.com."' | grep '"Id"' | cut -f 4 -d \" | cut -f 3 -d /)
RECORD=$(aws route53 list-resource-record-sets --hosted-zone-id ${ZONE_ID} --query "ResourceRecordSets[?Name == 'to-be-deleted.xiehang.com.']" | egrep -v '^\[|^\]' --max-items 1)
JSON='{"Changes":[{"Action": "DELETE","ResourceRecordSet":'${RECORD}'}]}'
aws route53 change-resource-record-sets --hosted-zone-id ${ZONE_ID} --change-batch file://<(echo ${JSON})

 

Nov 142015
 

I plan to get these done in the coming 6 months:

  1. Migrate 25K LOC python to Go, I’m proud to say 16K LOC are unit tests
  2. Find a reliable redis solution
  3. Evaluate Shinken
  4. Downgrade instance for this site
Jul 142015
 

This is my naive conclusion from short time of observation, everybody hates dealing with multiple ticketing systems, and it seems to me JIRA is much more clear as a “ticketing system”, but corporate/enterprise still prefers Rally, why?

Well, it’s because of corporate cares more about process, care about how much time people spent, either want to track workload, or just want to make sure employees are doing real jobs. On the other size, startups care about getting things done, they really don’t care, or have no time to care about workload, and trust people in the company are willing to take things whenever they are free.

I would like to see how other people think about this.

May 252015
 

Just to remind myself in case I get lost again:

  • Install Oracle JRE 7, at least for now JRE 8 is not recommended
    • Editย /etc/apt/sources.list.d/webupd8team-java.list with these lines:
      deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main               
      deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
    • Import GPG
      sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
    • Install
      sudo apt-get update
      sudo apt-get install oracle-java7-installer
  • Install Cassandra
    • Edit /etc/apt/sources.list.d/cassandra.source.list with these lines
      deb http://debian.datastax.com/community 2.1 main
      deb-src http://debian.datastax.com/community 2.1 main
    • Import keys
      curl -L http://debian.datastax.com/debian/repo_key | sudo apt-key add -
    • Install
      sudo apt-get update
      sudo apt-get install cassandra