Month: April 2012

  • How do you deploy an application.yml based config to heroku

    In one of my applications, I have the following config files that are excluded from git: * config/mongoid.yml * config/application.yml * config/mailserver_setting.rb * config/omniauth_settings.rb For deploying to a regular server, I just add tasks to my capistrano deployment file to create sym-links to a shared directory. In this case I have to modify my application…

  • Attic

    If you walk up our attic steps, you will be surrounded by this: The problem is that it takes forever to find and store things, so we don’t store them there or we buy duplicates of things we already have. I am often prevented from getting things done because I want them done perfectly. However,…

  • Mongoid counter_cache with has_and_belongs_to_many

    If I have two Mongoid models joined by a has_and_belongs_to_many relationship, Users and Groups. I need to quickly and efficiently sort by the most popular groups which really should be done with a counter_cache. However, counter_caches are implemented in rails by setting a callback to update the counter cache every time a child model is…

  • Official Modes of Travel for the US Department of Defense

    This one should be simple, but it is not. I just wanted to know what to put on an Air Force form 938 for “MODE OF TRAVEL”. This wasn’t easy. In the JFTR, https://www.defensetravel.dod.mil/Docs/Training/DTA_App_C.pdf Appendix K, Table K-3 associates each travel mode with its description, expense category, and single threshold. TRAVEL MODES AND OTHER TRANSPORTATION…

  • Active and Reserve Mix for USAF Space Command

    10:24 AM google.load(‘visualization’, ‘1’, {packages: [‘geomap’]}); google.load(‘visualization’, ‘1’, {packages: [‘geomap’]}); function drawVisualization() { var data = new google.visualization.DataTable(); data.addRows(51); data.addColumn(‘string’, ‘State’); data.addColumn(‘number’, ‘Military’); data.setValue(0,0,’US-AK’); data.setValue(0,1,108); data.setValue(1,0,’US-AL’); data.setValue(1,1,172); data.setValue(2,0,’US-CA’); data.setValue(2,1,639); data.setValue(3,0,’US-CO’); data.setValue(3,1,384); data.setValue(4,0,’US-DE’); data.setValue(4,1,66); data.setValue(5,0,’US-FL’); data.setValue(5,1,322); data.setValue(6,0,’US-GA’); data.setValue(6,1,441); data.setValue(7,0,’US-HI’); data.setValue(7,1,434); data.setValue(8,0,’US-ID’); data.setValue(8,1,48); data.setValue(9,0,’US-IL’); data.setValue(9,1,248); data.setValue(10,0,’US-KS’); data.setValue(10,1,218); data.setValue(11,0,’US-LA’); data.setValue(11,1,243); data.setValue(12,0,’US-MA’); data.setValue(12,1,306); data.setValue(13,0,’US-MD’); data.setValue(13,1,59); data.setValue(14,0,’US-ME’); data.setValue(14,1,242); data.setValue(15,0,’US-MN’); data.setValue(15,1,118);…

  • ARC and Active Basing

    This is just an attempt to understand where bases are and by which component. Total Locations google.load(‘visualization’, ‘1’, {packages: [‘geomap’]}); function drawVisualization() { var data = new google.visualization.DataTable(); data.addRows(120); data.addColumn(‘string’, ‘City’); data.addColumn(‘number’, ‘Auths’); data.setValue(0,0,’ABSTON, AL’); data.setValue(0,1,50); data.setValue(1,0,’ALCOA, TN’); data.setValue(1,1,276); data.setValue(2,0,’ANDREWS, MD’); data.setValue(2,1,18); data.setValue(3,0,’AURORA, CO’); data.setValue(3,1,3); data.setValue(4,0,’BARKING SANDS, HI’); data.setValue(4,1,138); data.setValue(5,0,’BEALE, CA’); data.setValue(5,1,82); data.setValue(6,0,’BOISE AIR TERMINAL,…

  • All Air National Guard Forces

    google.load(‘visualization’, ‘1’, {packages: [‘geomap’]}); function drawVisualization() { var data = new google.visualization.DataTable(); data.addRows(51); data.addColumn(‘string’, ‘Country’); data.addColumn(‘number’, ‘Guard Authorizations’); data.setValue(0,0,’US-AK’); data.setValue(0,1,723); data.setValue(1,0,’US-AL’); data.setValue(1,1,759); data.setValue(2,0,’US-AR’); data.setValue(2,1,658); data.setValue(3,0,’US-AZ’); data.setValue(3,1,762); data.setValue(4,0,’US-CA’); data.setValue(4,1,1627); data.setValue(5,0,’US-CO’); data.setValue(5,1,464); data.setValue(6,0,’US-CT’); data.setValue(6,1,442); data.setValue(7,0,’US-DC’); data.setValue(7,1,49); data.setValue(8,0,’US-DE’); data.setValue(8,1,374); data.setValue(9,0,’US-FL’); data.setValue(9,1,703); data.setValue(10,0,’US-GA’); data.setValue(10,1,937); data.setValue(11,0,’US-HI’); data.setValue(11,1,735); data.setValue(12,0,’US-IA’); data.setValue(12,1,670); data.setValue(13,0,’US-ID’); data.setValue(13,1,394); data.setValue(14,0,’US-IL’); data.setValue(14,1,1120); data.setValue(15,0,’US-IN’); data.setValue(15,1,635); data.setValue(16,0,’US-KS’); data.setValue(16,1,746); data.setValue(17,0,’US-KY’); data.setValue(17,1,435); data.setValue(18,0,’US-LA’);…

  • Arc versus Active Duty

    test google.load(‘visualization’, ‘1’, {packages: [‘geomap’]}); function drawVisualization() { var data = new google.visualization.DataTable(); data.addRows(51); data.addColumn(‘string’, ‘State’); data.addColumn(‘number’, ‘Military’); data.setValue(0,0,’US-AK’); data.setValue(0,1,108); data.setValue(1,0,’US-AL’); data.setValue(1,1,172); data.setValue(2,0,’US-CA’); data.setValue(2,1,639); data.setValue(3,0,’US-CO’); data.setValue(3,1,384); data.setValue(4,0,’US-DE’); data.setValue(4,1,66); data.setValue(5,0,’US-FL’); data.setValue(5,1,322); data.setValue(6,0,’US-GA’); data.setValue(6,1,441); data.setValue(7,0,’US-HI’); data.setValue(7,1,434); data.setValue(8,0,’US-ID’); data.setValue(8,1,48); data.setValue(9,0,’US-IL’); data.setValue(9,1,248); data.setValue(10,0,’US-KS’); data.setValue(10,1,218); data.setValue(11,0,’US-LA’); data.setValue(11,1,243); data.setValue(12,0,’US-MA’); data.setValue(12,1,306); data.setValue(13,0,’US-MD’); data.setValue(13,1,59); data.setValue(14,0,’US-ME’); data.setValue(14,1,242); data.setValue(15,0,’US-MN’); data.setValue(15,1,118); data.setValue(16,0,’US-MO’); data.setValue(16,1,123); data.setValue(17,0,’US-NC’); data.setValue(17,1,206); data.setValue(18,0,’US-NY’);…

  • My start as an IMA in the Air Force

    This article has become incredibly popular. It was written six years ago at the start of my reserve career. Since then, I’ve had an amazing fun, rewarding and high-impact career. First, I’ve had amazing bosses, Shawn Barnes and Tim Kelly, who are both amazing leaders but understood the difficulty of balancing my day job with…

  • Congressional District GIS Exploration

    MathJax.Hub.Config({tex2jax: {inlineMath: [[‘$’,’$’], [‘(‘,’)’]]}}); I wanted to be able to do this with my ip address: I do development and consulting in two areas I really love: fitness and political engagement. For some work I’m doing on the latter, I needed to figure out the latitude and longitude of the geographic center for each of…