Skip to content

Instantly share code, notes, and snippets.

View BekBrace's full-sized avatar
💻
Star it before you Fork it!

Bek Brace BekBrace

💻
Star it before you Fork it!
View GitHub Profile
@BekBrace
BekBrace / cheatSheet.docker
Last active May 4, 2023 06:30
Docker Cheat Sheet
Container Management Commands
// docker create image [Create the container]
// docker run image [start the image]
// docker start container [start the container]
// docker stop container [graceful stop]
// docker kill container [kill container]
// docker restart container [stop + start]
// docker pause container [suspends container]
// docker unpause container [resume container]
@BekBrace
BekBrace / Mongodbcs.db
Last active April 20, 2022 14:38
MongoDB Cheat Sheet
// I used Datagrip in my crash course, but you can use the mongodb shell and you'll ge tthe same results.
//Friday, 18th June, 2021
//mongoDB basic commands and queries
//To show all databases
show dbs
//To switch(choose) a database
use sampleDatabase
@BekBrace
BekBrace / settings.json
Last active November 27, 2021 10:38
JSX/HTML autocomplete in your React projects
// Add this code snippet to your settings.json file:
"emmet.includeLanguages": {
"javascript": "javascriptreact"
},
"emmet.triggerExpansionOnTab": true
@rpkyle
rpkyle / app.py
Created June 27, 2020 14:47
Dash for Python Stock Ticker Sample App
import dash
from dash.dependencies import Input, Output
import dash_core_components as dcc
import dash_html_components as html
from pandas_datareader import data as web
from datetime import datetime as dt
app = dash.Dash('Hello World',
external_stylesheets=['https://codepen.io/chriddyp/pen/bWLwgP.css'])
@kennethreitz
kennethreitz / 0_urllib2.py
Created May 16, 2011 00:17
urllib2 vs requests
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
gh_url = 'https://api.github.com'
req = urllib2.Request(gh_url)
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()