Skip to content

Commit d36a8ce

Browse files
committed
Update repo
testing
1 parent b03a7cb commit d36a8ce

File tree

21 files changed

+1476
-1468
lines changed

21 files changed

+1476
-1468
lines changed

.github/workflows/static.yml

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
1-
# Simple workflow for deploying static content to GitHub Pages
2-
name: Deploy static content to Pages
3-
4-
on:
5-
# Runs on pushes targeting the default branch
6-
push:
7-
branches: ["master"]
8-
9-
# Allows you to run this workflow manually from the Actions tab
10-
workflow_dispatch:
11-
12-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13-
permissions:
14-
contents: read
15-
pages: write
16-
id-token: write
17-
18-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20-
concurrency:
21-
group: "pages"
22-
cancel-in-progress: false
23-
24-
jobs:
25-
# Single deploy job since we're just deploying
26-
deploy:
27-
environment:
28-
name: github-pages
29-
url: ${{ steps.deployment.outputs.page_url }}
30-
runs-on: ubuntu-latest
31-
steps:
32-
- name: Checkout
33-
uses: actions/checkout@v4
34-
- name: Setup Pages
35-
uses: actions/configure-pages@v5
36-
- name: Upload artifact
37-
uses: actions/upload-pages-artifact@v3
38-
with:
39-
# Upload entire repository
40-
path: '.'
41-
- name: Deploy to GitHub Pages
42-
id: deployment
43-
uses: actions/deploy-pages@v4
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Deploy static content to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["master"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
# Single deploy job since we're just deploying
26+
deploy:
27+
environment:
28+
name: github-pages
29+
url: ${{ steps.deployment.outputs.page_url }}
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
- name: Setup Pages
35+
uses: actions/configure-pages@v5
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
# Upload entire repository
40+
path: '.'
41+
- name: Deploy to GitHub Pages
42+
id: deployment
43+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Dependencies
2-
node_modules
3-
4-
# Local Netlify folder
1+
# Dependencies
2+
node_modules
3+
4+
# Local Netlify folder
55
.netlify

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
PS4 utils repository
1+
# Personal site
2+
3+
## About me
4+
5+
I work as a freelance developer specializing in web application development, with experience setting up and managing Linux-based servers (Ubuntu or similar) using Apache with PHP or Node.js, as well as integrating databases.
6+
7+
I am also expanding my skills into Android development and using the Linux environment for development purposes on programming boards, particularly for controlling peripherals.
8+
9+
In addition to freelance and temporary projects, I pursue personal projects and hobbies in areas such as electronics and console hacking, which help me continuously grow my technical expertise and creativity.

_posts/2024-11-06-welcome.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{
2-
"date": "2024-11-06T17:23:00-05:00",
3-
"title": "Welcome",
4-
"body": "Welcome to my repository :)\nTesting posts"
5-
}
1+
{
2+
"date": "2024-11-06T17:23:00-05:00",
3+
"title": "Welcome",
4+
"body": "Welcome to my repository :)\nTesting posts"
5+
}

_posts/2024-11-18-hello-world.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{
2-
"date": "2024-11-18T01:16:00-05:00",
3-
"title": "Hello world",
4-
"body": "Anything"
5-
}
1+
{
2+
"date": "2024-11-18T01:16:00-05:00",
3+
"title": "Hello world",
4+
"body": "Anything"
5+
}

addpost.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
const fs = require('fs');
2-
const path = require('path');
3-
4-
const newPost = {
5-
title: 'Mi primer post',
6-
content: 'Este es el contenido de mi primer post'
7-
};
8-
9-
fs.writeFileSync(path.join(__dirname, '..', 'hello_post.json'), JSON.stringify(newPost), 'utf8');
1+
const fs = require('fs');
2+
const path = require('path');
3+
4+
const newPost = {
5+
title: 'Mi primer post',
6+
content: 'Este es el contenido de mi primer post'
7+
};
8+
9+
fs.writeFileSync(path.join(__dirname, '..', 'hello_post.json'), JSON.stringify(newPost), 'utf8');
1010
console.log('Archivo post.json creado exitosamente');

files/updater.sh

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
1-
#!/bin/sh
2-
3-
opkg update
4-
opkg upgrade
5-
6-
if [ -f /etc/init.d/pppoe-server ]; then
7-
rm /etc/init.d/pppoe-server
8-
fi
9-
if [ -f /etc/config/pppoe ]; then
10-
rm /etc/config/pppoe
11-
fi
12-
if [ -f /etc/ppp/chap-secrets ]; then
13-
rm /etc/ppp/chap-secrets
14-
fi
15-
if [ -f /etc/ppp/pap-secrets ]; then
16-
rm /etc/ppp/pap-secrets
17-
fi
18-
if [ -f /etc/ppp/pppoe-server-options ]; then
19-
rm /etc/ppp/pppoe-server-options
20-
fi
21-
if [ -d /www/assets ]; then
22-
rm -rf /www/assets
23-
fi
24-
if [ -f /www/pppwn.html ]; then
25-
rm -f /www/pppwn.html
26-
fi
27-
if [ -f /www/cgi-bin/pw.cgi ]; then
28-
rm -f /www/cgi-bin/pw.cgi
29-
fi
30-
31-
rm -f /usr/sbin/pppwn /etc/init.d/pw /etc/config/pw && rm -rf /root/*
32-
33-
mkdir /tmp/PPPwn_ow
34-
wget -O /tmp/pw.tar https://raw.githubusercontent.com/CodeInvers3/codeinvers3.github.io/refs/heads/master/files/PPPwn_ow.tar
35-
tar -xvf /tmp/pw.tar -C /tmp/PPPwn_ow && rm /tmp/pw.tar
36-
37-
mv -f /tmp/PPPwn_ow/etc/config/* /etc/config
38-
mv -f /tmp/PPPwn_ow/etc/init.d/* /etc/init.d
39-
mv -f /tmp/PPPwn_ow/etc/ppp/* /etc/ppp
40-
mv -f /tmp/PPPwn_ow/stage1 /root
41-
mv -f /tmp/PPPwn_ow/stage2 /root
42-
mv -f /tmp/PPPwn_ow/version /root
43-
mv -f /tmp/PPPwn_ow/www/cgi-bin/pw.cgi /www/cgi-bin/
44-
mv -f /tmp/PPPwn_ow/www/pppwn.html /www/
45-
mv -f /tmp/PPPwn_ow/www/assets /www/
46-
47-
rm -r /tmp/PPPwn_ow
48-
49-
chmod +x /etc/init.d/pw /etc/init.d/pppoe-server /www/cgi-bin/pw.cgi
50-
51-
/etc/init.d/pppoe-server enable
52-
/etc/init.d/pppoe-server start
53-
1+
#!/bin/sh
2+
3+
opkg update
4+
opkg upgrade
5+
6+
if [ -f /etc/init.d/pppoe-server ]; then
7+
rm /etc/init.d/pppoe-server
8+
fi
9+
if [ -f /etc/config/pppoe ]; then
10+
rm /etc/config/pppoe
11+
fi
12+
if [ -f /etc/ppp/chap-secrets ]; then
13+
rm /etc/ppp/chap-secrets
14+
fi
15+
if [ -f /etc/ppp/pap-secrets ]; then
16+
rm /etc/ppp/pap-secrets
17+
fi
18+
if [ -f /etc/ppp/pppoe-server-options ]; then
19+
rm /etc/ppp/pppoe-server-options
20+
fi
21+
if [ -d /www/assets ]; then
22+
rm -rf /www/assets
23+
fi
24+
if [ -f /www/pppwn.html ]; then
25+
rm -f /www/pppwn.html
26+
fi
27+
if [ -f /www/cgi-bin/pw.cgi ]; then
28+
rm -f /www/cgi-bin/pw.cgi
29+
fi
30+
31+
rm -f /usr/sbin/pppwn /etc/init.d/pw /etc/config/pw && rm -rf /root/*
32+
33+
mkdir /tmp/PPPwn_ow
34+
wget -O /tmp/pw.tar https://raw.githubusercontent.com/CodeInvers3/codeinvers3.github.io/refs/heads/master/files/PPPwn_ow.tar
35+
tar -xvf /tmp/pw.tar -C /tmp/PPPwn_ow && rm /tmp/pw.tar
36+
37+
mv -f /tmp/PPPwn_ow/etc/config/* /etc/config
38+
mv -f /tmp/PPPwn_ow/etc/init.d/* /etc/init.d
39+
mv -f /tmp/PPPwn_ow/etc/ppp/* /etc/ppp
40+
mv -f /tmp/PPPwn_ow/stage1 /root
41+
mv -f /tmp/PPPwn_ow/stage2 /root
42+
mv -f /tmp/PPPwn_ow/version /root
43+
mv -f /tmp/PPPwn_ow/www/cgi-bin/pw.cgi /www/cgi-bin/
44+
mv -f /tmp/PPPwn_ow/www/pppwn.html /www/
45+
mv -f /tmp/PPPwn_ow/www/assets /www/
46+
47+
rm -r /tmp/PPPwn_ow
48+
49+
chmod +x /etc/init.d/pw /etc/init.d/pppoe-server /www/cgi-bin/pw.cgi
50+
51+
/etc/init.d/pppoe-server enable
52+
/etc/init.d/pppoe-server start
53+
5454
rm -f /tmp/updater.sh

generateLastPosts.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
const fs = require('fs');
2-
const path = require('path');
3-
4-
const postsDir = path.join(__dirname, '_posts');
5-
const lastPostsFile = path.join(__dirname, 'lastposts.json');
6-
7-
// Lee archivos de la carpeta _posts y ordena por fecha
8-
const posts = fs.readdirSync(postsDir)
9-
.filter(file => file.endsWith('.json'))
10-
.map(file => {
11-
const filePath = path.join(postsDir, file);
12-
const content = JSON.parse(fs.readFileSync(filePath, 'utf8'));
13-
return { ...content, filename: file };
14-
})
15-
.sort((a, b) => new Date(b.date) - new Date(a.date)) // Ordena por fecha, el más reciente primero
16-
.slice(0, 10); // Limita a los 10 posts más recientes
17-
18-
// Escribe el archivo lastposts.json
19-
fs.writeFileSync(lastPostsFile, JSON.stringify(posts, null, 2), 'utf8');
20-
console.log('lastposts.json generado exitosamente.');
1+
const fs = require('fs');
2+
const path = require('path');
3+
4+
const postsDir = path.join(__dirname, '_posts');
5+
const lastPostsFile = path.join(__dirname, 'lastposts.json');
6+
7+
// Lee archivos de la carpeta _posts y ordena por fecha
8+
const posts = fs.readdirSync(postsDir)
9+
.filter(file => file.endsWith('.json'))
10+
.map(file => {
11+
const filePath = path.join(postsDir, file);
12+
const content = JSON.parse(fs.readFileSync(filePath, 'utf8'));
13+
return { ...content, filename: file };
14+
})
15+
.sort((a, b) => new Date(b.date) - new Date(a.date)) // Ordena por fecha, el más reciente primero
16+
.slice(0, 10); // Limita a los 10 posts más recientes
17+
18+
// Escribe el archivo lastposts.json
19+
fs.writeFileSync(lastPostsFile, JSON.stringify(posts, null, 2), 'utf8');
20+
console.log('lastposts.json generado exitosamente.');

netlify.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
[build]
2-
functions = "netlify/functions"
3-
publish = "public"
4-
command = "echo No build command"
5-
node_bundler = "esbuild"
6-
7-
[dev]
8-
publish = "public"
9-
node_bundler = "esbuild"
10-
11-
[[redirects]]
12-
from = "/api/*"
13-
to = "/.netlify/functions/:splat"
1+
[build]
2+
functions = "netlify/functions"
3+
publish = "public"
4+
command = "echo No build command"
5+
node_bundler = "esbuild"
6+
7+
[dev]
8+
publish = "public"
9+
node_bundler = "esbuild"
10+
11+
[[redirects]]
12+
from = "/api/*"
13+
to = "/.netlify/functions/:splat"
1414
status = 200

netlify/functions/hello.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
const fs = require('fs');
2-
const path = require('path');
3-
4-
exports.handler = async event => {
5-
const subject = event.queryStringParameters.name || 'World'
6-
7-
var html = ''
8-
9-
html = recursive('/var/task')
10-
11-
return {
12-
statusCode: 200,
13-
body: html,
14-
}
1+
const fs = require('fs');
2+
const path = require('path');
3+
4+
exports.handler = async event => {
5+
const subject = event.queryStringParameters.name || 'World'
6+
7+
var html = ''
8+
9+
html = recursive('/var/task')
10+
11+
return {
12+
statusCode: 200,
13+
body: html,
14+
}
1515
}

0 commit comments

Comments
 (0)