Skip to content

Instantly share code, notes, and snippets.

@aknosis
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aknosis/d28e664e3f5b23237c3a to your computer and use it in GitHub Desktop.
Save aknosis/d28e664e3f5b23237c3a to your computer and use it in GitHub Desktop.

#Me

  • Paul Giberson
  • Applications Architect @ Socious [socious.com]
  • PHP for 6 years, "PHP" for 3 years prior

##Idea

  • Appeal to attendees = twitter
  • Word cloud of #zendcon (graphical representations of data are awesome)

##Start-Up

###Local

php.exe -S 0.0.0.0:80 -t [docroot]

could not install composer because ssl wasn't enabled

  • fixed in php.ini (enabled extension)
composer require slim/slim

##Build app

###Frontend

###Backend

  • PHP / Slim

####Blueshift

  • install cloudfoundary
  • hunt for zendserver build pack (found manifest.yml in github repo)
  • fight trying to figure out how to configure document root
  • give up, restructure code
  • app is essentially live on bluemix

##Add twitter

Twitter doesn't allow anonymous api requests as of api V1.1

###Code doesn't work

###Got a response from twitter

fall asleep at 2 a.m.

###find a frontend

d3.js is the "new, cool" stuff, has a word cloud example

###d3.js

  • import plugin
  • learn tinyest bit of svg to fix layout issues, disect code

##Iterations

  • set count of tweets recieved to 100 (default 15)
  • remove "stop words" - http://wordsift.com/wordlists
  • remove bad UTF-8 chars that were killing json_decode()

#Final Deploy

  • Slim = overkill
  • Would have liked to have been able to poll tweets from the entire conference
  • Would have liked to have been able to do "real time" updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment