show dbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Learning TkInter | |
""" | |
#Import! | |
from tkinter import * | |
from tkinter.ttk import * | |
from tkinter import scrolledtext | |
from tkinter import messagebox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*------------------------------------------ | |
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) { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: train-schedule-service | |
spec: | |
type: NodePort | |
selector: | |
app: train-schedule | |
ports: | |
- protocol: TCP |