Skip to content

Instantly share code, notes, and snippets.

View jackie1santana's full-sized avatar
✍️
writing code ..

Jackie Santana jackie1santana

✍️
writing code ..
View GitHub Profile

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@jackie1santana
jackie1santana / MySQL_macOS_Sierra.md
Created April 20, 2020 23:39 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@jackie1santana
jackie1santana / Express-GraphQL (app.js)
Last active May 3, 2020 22:34
Express-GraphQL/Apollo Client Set Up
const express = require('express')
const graphqlHTTP = require('express-graphql')
const schema = require('./schema/schema')
const app = express()
app.use('/graphql', graphqlHTTP({
schema,
graphiql: true
}))
@jackie1santana
jackie1santana / Apollo Client & Server Set up ,js
Last active September 22, 2021 21:58
Apollo Client & Server Set up
const resolvers = {
Query: {
getCurrentGlobalCases: () => currentGlobalCases(),
getGlobalCasesByDate(parent, args) {
//id: Cases By Date
return globalCasesByDate(args.id);
},
// id: Cases By Country Name
@jackie1santana
jackie1santana / Add Data from Firebase app.js
Last active May 31, 2020 02:02
Firebase Client or Server Side Set Up
db.collection('cafes').add({
name: 'jack',
city: 'bronx'
})
1) npm install -g firebase-tools
2) firebase login
3) firebase init hosting
4) pick folder
5) firebase serve (if u want to see how the site looks in dev)
6) firebase deploy
@jackie1santana
jackie1santana / django_cheat_sheet.md
Created June 18, 2020 15:49 — forked from bradtraversy/django_cheat_sheet.md
Django command cheat sheet

Django 2.x Cheat Sheet

Creating a virtual environment

We need to create a virtual env for our app to run in: More Here Run this command in whatever folder you want to create your venv folder

python -m venv ./venv
@jackie1santana
jackie1santana / python_mysql.py
Created June 18, 2020 15:50 — forked from bradtraversy/python_mysql.py
Python & MySQL crash course for beginners
import mysql.connector
from mysql.connector import errorcode
config = {
'user': 'root',
'password': '',
'host': 'localhost',
'database': 'acme'
}
@jackie1santana
jackie1santana / python_heroku.MD
Created June 18, 2020 15:52 — forked from bradtraversy/python_heroku.MD
Python & Postgres Heroku Deployment

Python Heroku Deployment

Steps to create a postgres database and deply a Python app to Heroku

Install guinicorn locally

pipenv install gunicorn
or
pip install gunicorn