Skip to content

Instantly share code, notes, and snippets.

View patnebe's full-sized avatar
🎯
Focusing

Okwudili Pat-Nebe patnebe

🎯
Focusing
  • London, United Kingdom
  • 08:14 (UTC)
  • X @patnebe
View GitHub Profile
@Oliver-ke
Oliver-ke / FM-fullstack.md
Last active July 14, 2022 14:10
Note on Full Stack development at Frontend Masters

Note on Full Stack development at Frontendmasters.com

note: exclude the leading $ for commands, that just shows it a bash script and is meant to be run in a terminal

Full Stack => Knowing everything up from the front to the back

Frontend can be

  • Cars, -television, -browser, -etc

backend can be

  • API's, -platform, -Database -Security,
@bradtraversy
bradtraversy / mongodb_cheat_sheet.md
Last active January 12, 2025 19:56
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@swyxio
swyxio / 1.md
Last active December 21, 2024 13:48
Learn In Public - 7 opinions for your tech career

2019 update: this essay has been updated on my personal site, together with a followup on how to get started

2020 update: I'm now writing a book with updated versions of all these essays and 35 other chapters!!!!

1. Learn in public

If there's a golden rule, it's this one, so I put it first. All the other rules are more or less elaborations of this rule #1.

You already know that you will never be done learning. But most people "learn in private", and lurk. They consume content without creating any themselves. Again, that's fine, but we're here to talk about being in the top quintile. What you do here is to have a habit of creating learning exhaust. Write blogs and tutorials and cheatsheets. Speak at meetups and conferences. Ask and answer things on Stackoverflow or Reddit. (Avoid the walled gardens like Slack and Discourse, they're not public). Make Youtube videos

@nguyenkims
nguyenkims / log.py
Last active February 13, 2024 07:59
Basic example on how setup a Python logger
import logging
import sys
from logging.handlers import TimedRotatingFileHandler
FORMATTER = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
LOG_FILE = "my_app.log"
def get_console_handler():
console_handler = logging.StreamHandler(sys.stdout)
console_handler.setFormatter(FORMATTER)
@ludoo0d0a
ludoo0d0a / gist-ssh-github.md
Created September 4, 2017 20:24
github ssh keys AND no password

https://stackoverflow.com/questions/6565357/git-push-requires-username-and-password

A common mistake is cloning using the default (HTTPS) instead of SSH. You can correct this by going to your repository, clicking the ssh button left to the URL field and updating the URL of your origin remote like this:

git remote set-url origin [email protected]:username/repo.git

See http://stackoverflow.com/questions/7773181/git-keeps-prompting-me-for-password, make sure you are cloning your repos using ssh:

ssh://[email protected]/username/repo.git

@randallreedjr
randallreedjr / heroku-remote.md
Last active January 2, 2025 15:56
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
@dhrrgn
dhrrgn / core.py
Last active March 2, 2022 04:16
Tired of doing db.session.add and db.session.commit to save your records? Have no fear, save is here. Note: This is for use with Flask-SQLAlchemy
from .user import User
def init_db(db):
"""Add a save() function to db.Model"""
def save(model):
db.session.add(model)
db.session.commit()
db.Model.save = save