-
Notifications
You must be signed in to change notification settings - Fork 640
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
383 changed files
with
22,529 additions
and
368 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Code cleanup check | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
cleanup: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "14" | ||
|
||
- name: Install dependencies | ||
run: npm install glob | ||
|
||
- name: Run cleanup script | ||
run: node cleanup.js | ||
|
||
- name: Check for uncommitted changes | ||
id: git-check | ||
run: echo "::set-output name=status::$(git status --porcelain)" | ||
|
||
- name: Fail if changes are not committed | ||
run: echo "::error::There are files to clean, please run `npm install && npm run clean` locally and commit the changes in your pull request" | ||
if: steps.git-check.outputs.status != '' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
pull_request_rules: | ||
- name: automatic merge for main when CI passes and 1 review | ||
conditions: | ||
- "#approved-reviews-by>=1" | ||
- check-success=test | ||
- base=main | ||
actions: | ||
merge: | ||
method: merge |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Run Jest tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
inputs: | ||
pr_number: | ||
description: 'Pull request number (optional)' | ||
required: false | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run tests | ||
run: npm test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const glob = require('glob'); | ||
|
||
// Define the target directories | ||
const targetDirs = ["github-profiles"]; | ||
|
||
targetDirs.forEach(targetDir => { | ||
if (fs.existsSync(targetDir)) { | ||
const dirs = glob.sync(`${targetDir}/**/*.*`, { nodir: false }); | ||
|
||
// Rename folder names, replacing '.' with '(dot)' | ||
dirs.forEach(dir => { | ||
if (fs.lstatSync(dir).isDirectory()) { | ||
const parentDir = path.dirname(dir); | ||
const baseName = path.basename(dir); | ||
const newName = baseName.replace('.', '(dot)'); | ||
const newPath = path.join(parentDir, newName); | ||
|
||
if (dir !== newPath) { | ||
fs.renameSync(dir, newPath); | ||
} | ||
} | ||
}); | ||
|
||
// Delete files that match the .gitignore file | ||
const gitignorePath = path.join(targetDir, '.gitignore'); | ||
|
||
if (fs.existsSync(gitignorePath)) { | ||
const gitignore = fs.readFileSync(gitignorePath, 'utf-8'); | ||
const patterns = gitignore.split('\n').filter(pattern => pattern.trim() !== ''); | ||
|
||
patterns.forEach(pattern => { | ||
const files = glob.sync(path.join(targetDir, pattern)); | ||
|
||
files.forEach(file => { | ||
if (fs.existsSync(file)) { | ||
fs.unlinkSync(file); | ||
} | ||
}); | ||
}); | ||
} | ||
} else { | ||
console.log(`The target directory "${targetDir}" does not exist. Please check the path.`); | ||
} | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
const glob = require("glob"); | ||
|
||
const regularUsernameRegex = /(\w+|\(dot\))*/; | ||
const discordUsernameRegex = /(\w+|\(dot\))*-\d{4}/; | ||
|
||
// Define the array of folders and filenames to check | ||
const foldersToCheck = [ | ||
{ | ||
name: "github-profiles", | ||
filenames: ["index.html", "README.md", "**/*.css"], | ||
}, | ||
]; | ||
|
||
// Define the array of folders to ignore | ||
const foldersToIgnore = [".github", "node_modules", ".git"]; | ||
|
||
describe("Folder structure", () => { | ||
foldersToCheck.forEach((folderToCheck) => { | ||
// Get all folders in the current directory | ||
const folders = fs.readdirSync(path.join(__dirname, folderToCheck.name)); | ||
|
||
folders.forEach((folder) => { | ||
describe(`Check folder ${folderToCheck.name}/${folder}`, () => { | ||
test(`name ${folder} is valid`, () => { | ||
const usernameRegex = new RegExp( | ||
`(${regularUsernameRegex.source})|(${discordUsernameRegex.source})` | ||
); | ||
expect(folder).toMatch(usernameRegex); | ||
}); | ||
|
||
describe(`Check files in ${folderToCheck.name}/${folder}`, () => { | ||
// Check if each file in the filenames array exists in the folder | ||
folderToCheck.filenames.forEach((pattern) => { | ||
const files = glob.sync( | ||
path.join(__dirname, folderToCheck.name, folder, pattern), | ||
{ nocase: false } | ||
); | ||
test(`file ${pattern} exists in ${folder}`, () => { | ||
expect(files.length).toBeGreaterThan(0); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
|
||
test("Check for unexpected folders", () => { | ||
// Get all folders in the parent directory | ||
const folders = fs.readdirSync(__dirname); | ||
|
||
folders.forEach((folder) => { | ||
// Check if the folder is either in foldersToCheck, foldersToIgnore, or is not a directory | ||
const isExpectedFolder = | ||
foldersToCheck.some((f) => f.name === folder) || | ||
foldersToIgnore.includes(folder) || | ||
!fs.lstatSync(path.join(__dirname, folder)).isDirectory(); | ||
expect(isExpectedFolder).toBe(true); | ||
}); | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Hi, I'm Alexander Pinto 👋 | ||
|
||
I'm a **Frontend Development** student at **Undefined Academy**. | ||
My goal is to be able to deliver high quality code that is **readable**, **maintainable** and **scalable**. | ||
|
||
## Skills 🛠️ | ||
|
||
- React | ||
- TypeScript | ||
- HTML/CSS | ||
- Git | ||
|
||
## Contact me 📫 | ||
|
||
- [Github](https://github.com/alexpintodiaz) 🖥️ | ||
- [LinkedIn](https://www.linkedin.com/in/pintodiaz/) 💼 | ||
- [[email protected]](mailto:[email protected]) ✉️ | ||
|
||
## Terminal Commands 💥 | ||
|
||
| Command | Description | | ||
| ------- | ------------------------------------------------- | | ||
| ls | Lists the files in the current directory | | ||
| cd | Allows us to navigate between folders | | ||
| rm | Allows us to delete a folder given a path | | ||
| mkdir | Creates a new folder given a name for that folder | | ||
| touch | Creates a new file given a path and/or name | | ||
|
||
## Alias Commands 👽️ | ||
|
||
| Alias Command | Description | | ||
| ------------- | ----------- | | ||
| cl | clear | | ||
| npmd | npm run dev | | ||
| npms | npm start | | ||
|
||
**_Thanks for visiting my GitHub profile!_** 😊 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="stylesheet" href="main.css" /> | ||
<title>Alexander Pinto CV</title> | ||
</head> | ||
|
||
<body> | ||
<!-- Main section --> | ||
<h1>Hi, I'm Alexander Pinto 👋</h1> | ||
<p> | ||
I'm a <strong>Frontend Development</strong> student at | ||
<strong>Undefined Academy</strong>. | ||
<br /> | ||
My goal is to be able to deliver high quality code that is | ||
<strong>readable, maintainable and scalable</strong>. | ||
</p> | ||
<!-- Skills section --> | ||
<h2>Skills 🛠️</h2> | ||
<ul> | ||
<li>React</li> | ||
<li>TypeScript</li> | ||
<li>HTML/CSS</li> | ||
<li>Git</li> | ||
</ul> | ||
<!-- Contact section --> | ||
<h2>Contact me 📫</h2> | ||
<ul> | ||
<li><a href="https://github.com/alexpintodiaz">Github</a></li> | ||
<li><a href="https://www.linkedin.com/in/pintodiaz/">LinkedIn</a></li> | ||
<li> | ||
<a href="mailto:[email protected]" | ||
>[email protected]</a | ||
> | ||
</li> | ||
</ul> | ||
|
||
<!-- Terminal commands section --> | ||
|
||
<h2>Terminal Commands 💥</h2> | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th>Command</th> | ||
<th>Description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>ls</td> | ||
<td>Lists the files in the current directory</td> | ||
</tr> | ||
<tr> | ||
<td>cd</td> | ||
<td>Allows us to navigate between folders</td> | ||
</tr> | ||
<tr> | ||
<td>rm</td> | ||
<td>Allows us to delete a folder given a path</td> | ||
</tr> | ||
<tr> | ||
<td>mkdir</td> | ||
<td>Creates a new folder given a name for that folder</td> | ||
</tr> | ||
<tr> | ||
<td>touch</td> | ||
<td>Creates a new file given a path and/or name</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<!-- Alias commands section --> | ||
|
||
<h2>Alias Commands 👽️</h2> | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th>Alias Command</th> | ||
<th>Description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>cl</td> | ||
<td>clear</td> | ||
</tr> | ||
<tr> | ||
<td>npmd</td> | ||
|
||
<td>npm run dev</td> | ||
</tr> | ||
<tr> | ||
<td>npms</td> | ||
<td>npm start</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</body> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
@import url("https://fonts.googleapis.com/css2?family=Golos+Text&family=Grand+Hotel&display=swap"); | ||
|
||
body { | ||
background: #f3f4f6; | ||
margin: 0 auto; | ||
max-width: 50em; | ||
font-family: "Golos Text", "Helvetica", "Arial", sans-serif; | ||
line-height: 1.5; | ||
padding: 4em 1em; | ||
color: #566b78; | ||
} | ||
|
||
a { | ||
color: #e81c4f; | ||
} | ||
|
||
h2 { | ||
margin-top: 1em; | ||
padding-top: 1em; | ||
} | ||
|
||
h1, | ||
h2, | ||
strong { | ||
color: #333; | ||
} | ||
|
||
code, | ||
pre { | ||
background: #f5f7f9; | ||
border-bottom: 1px solid #d8dee9; | ||
color: #a7adba; | ||
} | ||
|
||
code { | ||
padding: 2px 4px; | ||
vertical-align: text-bottom; | ||
} | ||
|
||
pre { | ||
padding: 1em; | ||
border-left: 2px solid #69c; | ||
} | ||
|
||
th { | ||
padding-right: 4rem; | ||
} |
Oops, something went wrong.