Skip to content

Instantly share code, notes, and snippets.

View dnlsyfq's full-sized avatar
🧠

Danial J dnlsyfq

🧠
  • Kuala Lumpur , Malaysia
View GitHub Profile
@44213
44213 / Links.txt
Created September 18, 2021 13:26
Open Directories
@randallreedjr
randallreedjr / heroku-remote.md
Last active April 25, 2024 07:06
Add a Heroku remote to an existing git repo

Working with git remotes on Heroku

Generally, you will add a git remote for your Heroku app during the Heroku app creation process, i.e. heroku create. However, if you are working on an existing app and want to add git remotes to enable manual deploys, the following commands may be useful.

Adding a new remote

Add a remote for your Staging app and deploy

Note that on Heroku, you must always use master as the destination branch on the remote. If you want to deploy a different branch, you can use the syntax local_branch:destination_branch seen below (in this example, we push the local staging branch to the master branch on heroku.

$ git remote add staging https://git.heroku.com/staging-app.git
@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
@vitorbritto
vitorbritto / rm_mysql.md
Last active April 23, 2024 14:21
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql
    
This file has been truncated, but you can view the full file.
*M-UNKNOWN MEXICAN TRUCKING COMPANY
8CON CONTSHIP CONTAINER LINE
99M UNKNOWN MEXICAN OVERLAND CARRIER
AAAB AAA MOTORS
AAAC AAACTION TRANSPORTATION INC
AAAD A A A DELIVERY INC
AAAG ATC LOGISTICS INC
AAAO AAMODT INC
AAAU ASIA CONTAINER LEASING CO LTD
AAAW AAA WALKER TRANSPORTATION SERVICES
@gitaarik
gitaarik / git_submodules.md
Last active May 1, 2024 12:25
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.