Sep 232017
aws route53 change-resource-record-sets --hosted-zone-id $(aws route53 list-hosted-zones | grep -B 1 '""' | 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 '""' | grep '"Id"' | cut -f 4 -d \" | cut -f 3 -d /) --query "ResourceRecordSets[?Name == '']" --max-items 1| egrep -v '^\[|^\]')'}]}')

Or as a script:

ZONE_ID=$(aws route53 list-hosted-zones | grep -B 1 '""' | 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 == '']" | 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 trusty main               
      deb-src trusty main
    • Import GPG
      sudo apt-key adv --keyserver hkp:// --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 2.1 main
      deb-src 2.1 main
    • Import keys
      curl -L | sudo apt-key add -
    • Install
      sudo apt-get update
      sudo apt-get install cassandra
Mar 222015

echo package-name hold | sudo dpkg --set-selections

So that it will not be upgraded.

Reason: a package’s ppa has a brand new version that is not compatible with previous version, but since the new version is there so Ubuntu downloaded and installed the new version, and it made almost everything on my system broken.

Have to lock down that package, unless I’m so sure I can upgrade it.