forked from X-Financial-Technologies/Library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swe-for-dummies.html
155 lines (155 loc) · 4.92 KB
/
swe-for-dummies.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: Arial;
font-size: 8pt;
line-height: 1;
}
</style>
</head>
<body>
Full Stack SWE<br>
Key Terms<br>
IDE, "integrated development environment" / where you write code<br>
Deploy, launch website<br>
Local, on your computer<br>
API, talk to code in other products<br>
Command prompt, terminal for windows<br>
Powershell, terminal for windows v2<br>
Repository, code project directory "repo"<br>
Fork, copying github project to your account<br>
Documentation, how the software works<br>
Ubuntu, terminal for Linux<br>
Node.js, install things from terminal (npm install)<br>
Branch, different version of repo<br>
Languages<br>
HTML - frontend<br>
Javascript - backend + Node.js<br>
CSS - frontend design<br>
Python - data work<br>
VBA - data work in excel<br>
Solidity - smart contracts<br>
SVG - images<br>
UML - sequence diagrams<br>
Markdown - README files<br>
Latex - write whitepapers<br>
Tooling<br>
Replit, write and deploy websites<br>
Github, google drive for code<br>
W3 spaces, write and deploy websites<br>
Vercel, deploy from github<br>
Netlify, deploy from github<br>
Render, deploy from github<br>
Gitbooks, documentation<br>
VS Code, local IDE<br>
Pycharm, python local IDE<br>
SVG viewer, image IDE<br>
PlantUML, basic UML IDE<br>
Mermaid, aesthic UML IDE<br>
Overleaf, latex IDE<br>
Codespaces, IDE for github repos<br>
Remix, smart contract IDE<br>
Excel to HTML, table generator<br>
Hardhat, compile + test + deploy smart contracts<br>
Terminal Commands<br>
cd C:\Master\Software\demo\x-protocol - move around<br>
Pip install - download things for python<br>
npm install - download things for node.js<br>
npm run - run node.js<br>
Npx - run packages (e.g. hardhat, truffle)<br>
git clone - copy code from github projects<br>
dir - return file directory, powershell<br>
ls - return file directory, ubuntu<br>
ctrl + L - clear powershell<br>
BEST PRACTICES<br>
Project directory setup →<br>
Basic<br>
index.html - main HTML page<br>
script.js - client-side JavaScript<br>
style.css - CSS styles<br>
Node.js<br>
index.js - main server file<br>
public/ - folder for static files<br>
assets/ - images, fonts, etc.<br>
index.html - main HTML page<br>
script.js - client-side JavaScript<br>
style.css - CSS styles)<br>
Learning<br>
Build websites in replit with basic template<br>
Build website in replit with node.js<br>
Fork a github project, deploy with netlify<br>
Write a README file in markdown in github codespaces<br>
USE CLAUDE + CHATGPT!!!!<br>
How to update your github repo from codespace<br>
open integrated terminal<br>
git add .<br>
git commit -m "example message"<br>
git push -u origin<br>
How to update codespace if new files were added to github repo<br>
git pull --rebase origin<br>
How to override and force an update to github repo<br>
git push -f origin<br>
How to rollback a github repo to a specific commit<br>
git reset --hard 2dac28492d8b201e7d751e17a31ccf559b0943ac<br>
git push -f origin main<br>
Example Terminal Flows<br>
Ubuntu<br>
wget -r -k -E -l 10 -p -np -w 1 -e robots=off <URL> - downloads site up to 10 levels, converts links for offline use, waits 1 second, ignores robots.txt<br>
wget -r -np -k -p https://www.bridge.xyz/<br>
Powershell<br>
npm run test<br>
npm run coverage<br>
npm run lint<br>
npx hardhat node<br>
npx hardhat compile<br>
npx hardhat run scripts/deploy.ts --network sepolia<br>
cd C:\Users\alexa\Desktop\mvp<br>
Get-ChildItem -Recurse -Force<br>
Get-ChildItem -Recurse -Force -Exclude node_modules<br>
Get-ChildItem -Recurse -Force | Where-Object { $_.FullName -notmatch 'node_modules' }<br>
npm init -y<br>
npm install web3 solc<br>
npm install ganache-cli<br>
npm install solc<br>
npm install path<br>
npm install fs<br>
npm install @openzeppelin/contracts<br>
mkdir contracts<br>
mkdir scripts<br>
mkdir build<br>
New-Item -Path .\contracts\USDX.sol -ItemType File<br>
New-Item -Path .\contracts\rUSDX.sol -ItemType File<br>
New-Item -Path .\contracts\USDXManager.sol -ItemType File<br>
New-Item -Path .\contracts\MockOracle.sol -ItemType File<br>
New-Item -Path .\scripts\deploy.js -ItemType File<br>
New-Item -Path .\scripts\interact.js -ItemType File<br>
New-Item -Path .\compile.js -ItemType File<br>
npx ganache-cli<br>
node scripts/compile.js<br>
node scripts/deploy.js<br>
node scripts/interact.js<br>
npm init -y<br>
npm install web3 dotenv<br>
npm install solc<br>
mkdir contracts<br>
mkdir scripts<br>
mkdir build<br>
New-Item -Path .\contracts\SimpleStorage.sol<br>
New-Item -Path .\scripts\deploy.js<br>
New-Item -Path .\.env<br>
const { Web3 } = require('web3');<br>
npm install ganache-cli<br>
npx ganache-cli<br>
cd C:\Users\alexa\Desktop\basic<br>
wget -r -k -E -l 10 -p -np -w 1 -e robots=off <URL><br>
wget -r -np -k -p https://www.bridge.xyz/<br>
wget -r -np -k -p https://people.duke.edu/~charvey/*<br>
git init<br>
git add .<br>
git commit -m "Initial commit"<br>
git remote add origin https://github.com/amr080/xft-bridge-api.git<br>
git push -f origin master<br>
</body>
</html>