This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Aliases | |
| alias g='git' | |
| compdef g=git | |
| alias gst='git status' | |
| compdef _git gst=git-status | |
| alias gl='git pull' | |
| compdef _git gl=git-pull | |
| alias gup='git fetch && git rebase' | |
| compdef _git gup=git-fetch | |
| alias gp='git push' | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # http://en.wikipedia.org/wiki/Extreme_points_of_the_United_States#Westernmost | |
| top = 49.3457868 # north lat | |
| left = -124.7844079 # west long | |
| right = -66.9513812 # east long | |
| bottom = 24.7433195 # south lat | |
| def cull(latlngs): | |
| """ Accepts a list of lat/lng tuples. | |
| returns the list of tuples that are within the bounding box for the US. | |
| NB. THESE ARE NOT NECESSARILY WITHIN THE US BORDERS! | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import datetime | |
| # requires python-dateutil (http://labix.org/python-dateutil) | |
| from dateutil.relativedelta import relativedelta | |
| def get_month_day_range(date): | |
| """ | |
| For a date 'date' returns the start and end date for the month of 'date'. | |
| Month with 31 days: | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear! | |
| Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy. | |
| * Off the top of my head * | |
| 1. Fork their repo on Github | |
| 2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it | |
| git remote add my-fork [email protected] | 
NewerOlder