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
function exerciseOne(names){ | |
// Exercise One: In this exercise you will be given and array called names. | |
// Using the forEach method and a callback as it's only argument, console log | |
// each of the names. | |
names.forEach(function(name){ | |
console.log(name); | |
}); | |
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
// Exercise One: In this exercise you will be creating two functions. | |
// Function One: Will be called 'multiply'. | |
// This function will take two parameters, both numbers | |
// This function will return the two numbers multiplied together. | |
function multiply(num1, num2) { | |
return num1 * num2; | |
} |
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
function exerciseOne(UserClass){ | |
// Exercise One: In this exercise you are given a class called UserClass. | |
// You will be adding a method to the prototype called greeting | |
// This method will return the string: 'Hello, it is nice to meet you!' | |
// DO NOT create a new class or object | |
UserClass.prototype.greeting = function(){ | |
return 'Hello, it is nice to meet you!'; | |
}; | |
// Please write your code in the lines above | |
return UserClass; |
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
function ClassOne(name, pw, mail){ | |
// Exercise One: In this exercise you will be creating your own class! | |
// You are currently in the class, you are given three strings, name, pw, and mail. | |
// You need to create three properties on this class. | |
// Those properties are: 'username', 'password', and 'email' | |
// Set the value of username to name, | |
// Set the value of password to pw, | |
// Set the value of email to mail | |
this.username = name; | |
this.password = pw; |
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
# a million commits | |
for Y in {2018..2019} | |
do | |
mkdir $Y | |
cd $Y | |
for M in {05..10} | |
do | |
mkdir $M | |
cd $M | |
for D in {05..27} |
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
/// <reference types="next" /> | |
/// <reference types="next/types/global" /> | |
import * as React from 'react'; | |
// why null ? | |
type _ANY = any; | |
type _ANYS = any; | |
declare module 'react' { | |
interface HTMLAttributes<T> { | |
// Add | |
autoscroll?: boolean; |
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 { config } from 'dotenv' | |
import Shopify from 'shopify-api-node' | |
import cryptographer from '@brixtol/cryptographer' | |
config() | |
export const crypto = cryptographer(process.env.SHOPIFY_AUTH_SECRET) | |
/** | |
* Request Headers |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the\
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)