Skip to content

Instantly share code, notes, and snippets.

View edeediong's full-sized avatar
🏠
Working from home

Edidiong Etuk edeediong

🏠
Working from home
View GitHub Profile
@ops-gaurav
ops-gaurav / docker-compose.yml
Created January 30, 2018 13:13
DockerCompose Nodejs, Express, MongoDB, Nginx, Staging/Production
# This is the production variant of
# docker deployment
version: '3'
services:
#built by master branch
<container-name>:
image: index.docker.io/<account>/<repo>:master
container_name: '<app-name>'
ports:
- 8000:3000
@hugobowne
hugobowne / tweet_listener.py
Last active October 6, 2023 18:48
NOTE: this code is for a previous version of the Twitter API and I will not be updating in the near future. If someone else would like to, I'd welcome that! Feel free to ping me. END NOTE. Here I define a Tweet listener that creates a file called 'tweets.txt', collects streaming tweets as .jsons and writes them to the file 'tweets.txt'; once 100…
class MyStreamListener(tweepy.StreamListener):
def __init__(self, api=None):
super(MyStreamListener, self).__init__()
self.num_tweets = 0
self.file = open("tweets.txt", "w")
def on_status(self, status):
tweet = status._json
self.file.write( json.dumps(tweet) + '\n' )
self.num_tweets += 1
@vasanthk
vasanthk / System Design.md
Last active November 14, 2024 11:31
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?