This sheet goes along with this SSH YouTube tutorial
$ ssh [email protected]
$ mkdir test
$ cd test
| document.getElementById("phoneNum").addEventListener("input", (event) => { | |
| const regex =/^\(?(\d{3})\)?[-. ]?(\d{3})[-. ]?(\d{4})$/g; | |
| const input = document.getElementById("phoneNum"); | |
| const format = document.querySelector(".phoneFormat"); | |
| const phone = input.value; | |
| const found = regex.test(phone); | |
| if (!found && phone.length) { | |
| var selectDB = function(port, dbName) { | |
| if(!port){ | |
| port = 27017; | |
| } | |
| if (!dbName){ | |
| dbName = "test_1"; | |
| } |
| class Solution(object): | |
| def generateParenthesis(self, n): | |
| """ | |
| :type n: int | |
| :rtype: List[str] | |
| """ | |
| # p in this case is just '()' because we are | |
| # supposed to output a list of strings | |
| def generate(p, left, right, parenth=[]): | |
| # first iteration for left |
| print('Create an account now') | |
| username = input('Enter your usename: ') | |
| password = input('Enter your password: ') | |
| print('Your account has been created sucessfully') | |
| print('Login Now!') | |
| username2 = input('Enter your username: ') | |
| password2 = input('Enter your password: ') |
| #!flask/bin/python | |
| from flask import Flask, jsonify, abort, request, make_response, url_for | |
| from flask_httpauth import HTTPBasicAuth | |
| app = Flask(__name__, static_url_path = "") | |
| auth = HTTPBasicAuth() | |
| @auth.get_password | |
| def get_password(username): | |
| if username == 'miguel': |
$ ssh [email protected]
$ mkdir test
$ cd test
| package main | |
| import ("fmt") | |
| type Person struct { | |
| name string | |
| age int | |
| job string | |
| salary int | |
| } |
| package main | |
| import ("fmt") | |
| func factorial_recursion(x float64) (y float64) { | |
| if x > 0 { | |
| y = x * factorial_recursion(x-1) | |
| } else { | |
| y = 1 | |
| } | |
| return |
| package main | |
| import ("fmt") | |
| func testcount(x int) int { | |
| if x == 11 { | |
| return 0 | |
| } | |
| fmt.Println(x) | |
| return testcount(x + 1) | |
| } |
| package main | |
| import ("fmt") | |
| func myFunction(x int, y int) (result int) { | |
| result = x + y | |
| return | |
| } | |
| func main() { | |
| fmt.Println(myFunction(1, 2)) |