Skip to content

Instantly share code, notes, and snippets.

View galarant's full-sized avatar

Jeff Revesz galarant

View GitHub Profile
<select name="jump-to" class="jump-to"> <option>Jump to...</option> <option value="/campaign?id=25309">Campaign Manager</option> <option value="/creative?id=25309">Creative Manager</option> <option value="/pixel?id=25309">Conversion Pixels</option> <option value="/segment?id=25309">Segment Pixels</option><option value="/advertiser/user?id=25309">Users</option> <option value="/report/advertiser?id=25309">Reporting</option> </select>
<select name="jump-to" class="jump-to">
<option>Jump to...</option>
<option value="/campaign?id=25309">Campaign Manager</option>
<option value="/creative?id=25309">Creative Manager</option>
<option value="/pixel?id=25309">Conversion Pixels</option>
<option value="/segment?id=25309">Segment Pixels</option>
<option value="/advertiser/user?id=25309">Users</option>
<option value="/report/advertiser?id=25309">Reporting</option>
</select>
{social_ads: [
social_ad: {
...
...
social_creative: {
...
...
social_ad_title: {
...
...
project_root/
...
pro_soda/
...
admin/
frontend/
app/
components/
some_global_component.js
modules/
{
"link_url": "http:\/\/www.buzzfeed.com\/alisonvingiano\/this-terrifying-clown-has-been-roaming-the-streets-of-staten",
"title": "This Terrifying Clown Has Been Roaming The Streets Of Staten Island And Scaring The Crap Out Of Everyone",
"social_ad_campaign": {
"title": "1.1.1 Deployment Test"
}
}

##Intermediate Bootcamp

The goal of this bootcamp is to create a simple MVC web application in Django from scratch.

The app should be built on your local machine and then pushed to a public repo when it is finished, for review.

###App: The Forum

The "Forum" is a single-page application with the following functionality:

@galarant
galarant / gist:e8e667ee7b3442a4f8aa
Last active August 29, 2015 14:19
basic loom workflow

Workflow for Tickets:

  1. in JIRA, move your ticket to "In Progress"
  2. make sure your current branch is clean: git status
  3. checkout the latest release: git checkout [release_branch_name]
  4. pull the upstream changes on the latest release branch: git pull origin [release_branch_name]
  5. create and checkout a working branch off of the release: git checkout -b [working_branch_name]
  6. do your work on the branch
  7. when work is finished, stage your changes: git add .
  8. commit the staged changes: git commit -m 'descriptive commit message'
  9. make sure your branch is clean: git status
@galarant
galarant / web_dev.md
Last active August 29, 2015 14:27
localhost web development in OSX
  1. open a terminal:
    Command-Spacebar to bring up Spotlight, then search for "terminal" and hit Enter
    When terminal opens, click the maximize button to fullscreen it (I will call this Terminal 1 from now on)

  2. in your first terminal tab, start your local web server and leave it running:
    cd ~/pixi_sandbox
    ./manage.py runserver

  3. open a new terminal tab and leave it open on the frontend package root:
    Command-T to create a new terminal tab (I will call this Terminal 2 from now on)

@coroutine
def increment_a_key(my_dict, key):
my_dict[key] += 1
def main():
example_dict = {'a': 1, 'b': 2, 'c': 3}
yield [increment_a_key(example_dict, k) for (k, v) in example_dict.items()]
print example_dict
businesses = []
inspections = []
for row in reader():
# Find business in my list if it exists, else default to None
# The technique is not obvious or simple, but see here for explanation:
# http://stackoverflow.com/a/8653568/765103
camis = row[0]
business = next((b for b in businesses if b.camis == camis), None)