Skip to content

Instantly share code, notes, and snippets.

View DopamineDriven's full-sized avatar
🎯
cloud hopping

Andrew Ross DopamineDriven

🎯
cloud hopping
View GitHub Profile
@DopamineDriven
DopamineDriven / Hypotenuse of a right triangle
Created January 4, 2019 23:42
Hypotenuse of a right triangle
print("Solving for the hypotenuse, c, of a right triangle.")
a=input("input length of a:")
b=input("input length of b:")
a=float(a)
b=float(b)
c=((a**2+b**2)**0.5)
print(c)
@DopamineDriven
DopamineDriven / Solving for Theta in degrees
Created January 5, 2019 03:16
Determining the angle theta using force components Fx and Fy
import math
print("Solving for theta of force components x and y.")
x=input("input force component x:")
y=input("input force component y:")
x=float(x)
y=float(y)
z=math.atan(y/x)
theta=math.degrees(z)
print(theta)
@DopamineDriven
DopamineDriven / Solving for the Magnitude of Force and Theta in degrees
Created January 5, 2019 03:21
Determining the Magnitude and Angle of Force using Vector components Fx and Fy
import math
print("Solving for theta of force components x and y.")
x=input("input force component x:")
y=input("input force component y:")
x=float(x)
y=float(y)
z=math.atan(y/x)
theta=math.degrees(z)
w=((x**2+y**2)**0.5)
print(w)
{
"javascript.updateImportsOnFileMove.enabled": "always",
"prettier.useTabs": true,
"typescript.updateImportsOnFileMove.enabled": "always",
"prettier.trailingComma": "none",
"eslint.alwaysShowStatus": true,
"eslint.debug": true,
"eslint.validate": [
"javascript",
"javascriptreact",
$ mkdir server && cd server && npm init -y
@DopamineDriven
DopamineDriven / dependencies
Created June 30, 2020 02:17
dependencies and dev dependencies
$ npm i --save express mongodb && npm i --save-dev @types/express @types/mongodb @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser dotenv eslint nodemon ts-node typescript
@DopamineDriven
DopamineDriven / create required config files and the src directory
Created June 30, 2020 02:23
create required config files and the src directory
$ touch .env .eslintrcjson tsconfig.json && mkdir src && cd src && touch index.ts && cd ..
import {IconDefinition, IconLookup, IconName, IconPrefix, IconPathData, IconPack } from '@fortawesome/fontawesome-common-types';
export {IconDefinition, IconLookup, IconName, IconPrefix, IconPathData, IconPack } from '@fortawesome/fontawesome-common-types';
export const dom: DOM;
export const library: Library;
export const parse: { transform(transformString: string): Transform };
export const config: Config;
export function noAuto():void;
export function findIconDefinition(iconLookup: IconLookup): IconDefinition;
export function text(content: string, params?: TextParams): Text;
export function counter(content: string | number, params?: CounterParams): Counter;
@DopamineDriven
DopamineDriven / index.d.ts
Created August 20, 2020 07:28
fontawesome-common-types
export type IconPrefix = "fas" | "fab" | "far" | "fal" | "fad";
export type IconPathData = string | string[]
export interface IconLookup {
prefix: IconPrefix;
// IconName is defined in the code that will be generated at build time and bundled with this file.
iconName: IconName;
}
export interface IconDefinition extends IconLookup {
@DopamineDriven
DopamineDriven / index.d.ts
Created August 20, 2020 07:31
IconLookup Interface Inspection
export type IconPrefix = "fas" | "fab" | "far" | "fal" | "fad";
export type IconPathData = string | string[]
export interface IconLookup {
prefix: IconPrefix;
// IconName is defined in the code that will be generated at build time and bundled with this file.
iconName: IconName;
}
export type IconName = '500px' |