Skip to content

Instantly share code, notes, and snippets.

View nickb-minted's full-sized avatar

Nick Borromeo nickb-minted

View GitHub Profile

TODO

Phase 1

  • Modify/Merge in PR with logging https://github.com/minted/minted/pull/10061
  • Test end to end to make sure logging is working. You can call the cron manually on vagrant and check that logs are working
  • Refactor the logic to do upgrades from Standard and Fast classes and move them to parent class (SLAManager)
  • Change the definition of def get_fulfiller_id(self): so that it just returns self.po.minted_fulfiller_id. No query required
  • Add the cron definition in puppet
Commits to patch

environment_provisioning

###Summary This project will let you build an new environment from scratch in AWS.

It uses the python library Troposphere to generate Cloudformation templates, which are uploaded to S3. The url of the template on S3 is then passed to the Cloudformation service, which builds the environment.

###Deploying a new copy of the default environment

The core of this is "build_environment.py". A successful run does not output anything. Log into AWS and look at the Cloudformation console to watch your environment being built.

@nickb-minted
nickb-minted / vim_tips.md
Last active December 11, 2015 19:52
Collection of some vim text magic

Adding commas to the end of a po numbers

  • This assumes that the items you have are one per line
  1. Go to the top of the list
  2. Go to the end of the word/number of the first word (SHIFT + $)
  3. Hit Crtl + V
  4. Hit Shift + g
  5. Hit Shift + $ (this will remove the highlight of the entire block and only leave the last character highlighted)
  6. Hit Shift + A
  7. Hit , (for this case, but it can be any character that you want)
  8. Hit esc (commas [or whatever character you pressed] are now added to the end
class GildedRose(object):
def __init__(self, name, quality, days_remaining):
self.name = name
self.quality = quality
self.days_remaning = days_remaining
def tick(self):
if self.name != 'Aged Brie' and self.name != 'Backstage passes to a TAFKAL80ETC concert':
if self.quality > 0:
Hi and welcome to team Gilded Rose. As you know, we are a small inn with a prime location in a prominent city run by a friendly innkeeper named Allison. We also buy and sell only the finest goods. Unfortunately, our goods are constantly degrading in quality as they approach their sell by date. We have a system in place that updates our inventory for us. It was developed by a no-nonsense type named Leeroy, who has moved on to new adventures.
First an introduction to our system:
All items have a SellIn (days_remaining) value which denotes the number of days we have to sell the item
All items have a Quality (quality) value which denotes how valuable the item is
At the end of each day our system lowers both values for every item
Pretty simple, right? Well this is where it gets interesting:
Once the sell by date has passed, Quality degrades twice as fast
" Vundle Setup
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
filetype plugin indent on
" let Vundle manage Vundle
Bundle 'gmarik/vundle'
" My Bundles
" ===============
import string
import urllib2
def _main():
f = open('duplicates', 'r')
for line in f:
xml = string.Template(XML_ORDER_STATUS).substitute(
prodID=line.strip())
req = urllib2.Request('http://dpcsxml.cgx.com/PrintTalk/BTSHTTPReceive.dll', xml)
" Vundle Setup
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
filetype plugin indent on
" let Vundle manage Vundle
Bundle 'gmarik/vundle'
" My Bundles
" ===============