Skip to content

Instantly share code, notes, and snippets.

View massifaqiri's full-sized avatar

Massi Faqiri massifaqiri

View GitHub Profile

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

"""
Learning TkInter
"""
#Import!
from tkinter import *
from tkinter.ttk import *
from tkinter import scrolledtext
from tkinter import messagebox
import pytest
from funcs import capital_case
from funcs import Wallet
#Simple Assertion
def test_capital_case():
assert capital_case("holy") == "Holy"
#Raise an error if our function is not handling an exception of type. It's more like a test of error handling
@massifaqiri
massifaqiri / css-media-queries-cheat-sheet.css
Created July 25, 2020 05:26 — forked from bartholomej/css-media-queries-cheat-sheet.css
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }
@massifaqiri
massifaqiri / enzyme-cheatsheet.js
Created July 21, 2020 23:50 — forked from jahe/enzyme-cheatsheet.js
Enzyme Cheatsheet
// Show rendered HTML
const wrapper = shallow(<App />)
console.log(wrapper.debug())
// Disable lifecycle methods of react within tests
const wrapper = mount(<App />, { disableLifecycleMethods: true })
// Assert number of occurrences
expect(wrapper.find('p').length).toBe(1)
#!/bin/bash
# Use this for your user data (script from top to bottom)
# install httpd (Linux 2 version)
yum update -y
yum install -y httpd
systemctl start httpd
systemctl enable httpd
echo "<h1>Hello World from $(hostname -f)</h1>" > /var/www/html/index.html
kind: Service
apiVersion: v1
metadata:
name: train-schedule-service
spec:
type: NodePort
selector:
app: train-schedule
ports:
- protocol: TCP