Skip to content

Instantly share code, notes, and snippets.

@brenguy
brenguy / server.rb
Created November 17, 2017 18:16
server.rb for apache cookbook
#
# The package, named "httpd" is installed
#
# @see https://docs.chef.io/resource_package.html
#
package 'apache2'
#
# The template, named "/var/www/html/index.html" is created
@brenguy
brenguy / server.rb
Created November 17, 2017 17:47
apache server recipe
#
# The package, named "httpd" is installed
#
# @see https://docs.chef.io/resource_package.html
#
package 'apache2'
#
# The template, named "/var/www/html/index.html" is created
@brenguy
brenguy / ports.conf.erb
Last active November 17, 2017 17:12
ports.conf.erb
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
Listen <%= node['apache']['port'] %>
<IfModule ssl_module>
Listen 443
</IfModule>
import tweepy
import json
screen_name = "$TWITTERNAME"
auth = tweepy.OAuthHandler("$CONSUMER_KEY", "$CONSUMER_SECRET_KEY")
auth.set_access_token('ACCESS_TOKEN', 'ACCESS_TOKEN_SECRET')
api = tweepy.API(auth)
historical_tweets = api.user_timeline(screen_name = screen_name,count=200)
for tweet in historical_tweets:
print tweet.text