Skip to content

Commit

Permalink
abstraction
Browse files Browse the repository at this point in the history
  • Loading branch information
jpnt committed Aug 19, 2024
1 parent 1c99bcc commit ecd3aeb
Show file tree
Hide file tree
Showing 78 changed files with 10,582 additions and 192 deletions.
12 changes: 6 additions & 6 deletions 404.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">

Expand All @@ -10,12 +10,12 @@
<meta name="keywords" content="" />
<meta name="robots" content="noodp" />
<meta name="theme-color" content="" />
<link rel="canonical" href="http://localhost:1313/404.html" />
<link rel="canonical" href="https://jpnt.github.io/404.html" />


<title>

404 Page not found :: jpnt website — Welcome! &amp;#128515;
404 Page not found :: jpnt website — Welcome &amp;#128515;

</title>

Expand Down Expand Up @@ -112,9 +112,9 @@
<h1>404</h1>
<p>Oops, page not found…</p>
<p class="btn-404">
<a href="http://localhost:1313/">
<a href="https://jpnt.github.io/">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-home"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>Home</a>
<a href="http://localhost:1313/posts">
<a href="https://jpnt.github.io/posts">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-archive"><polyline points="21 8 21 21 3 21 3 8"></polyline><rect x="1" y="3" width="22" height="5"></rect><line x1="10" y1="12" x2="14" y2="12"></line></svg>Archives</a>
</p>
</div>
Expand All @@ -135,7 +135,7 @@ <h1>404</h1>



<script type="text/javascript" src="/bundle.min.85fad2de4f13fec3bcb3b3cb10430cdb44a7b4a9749b32938241a5c6e77718df7624f1002b880521fdc26e24ec1077fda214bf1cb36ee3045510760d09638cae.js" integrity="sha512-hfrS3k8T/sO8s7PLEEMM20SntKl0mzKTgkGlxud3GN92JPEAK4gFIf3CbiTsEHf9ohS/HLNu4wRVEHYNCWOMrg=="></script>
<script type="text/javascript" src="/bundle.min.e89fda0f29b95d33f6f4224dd9e5cf69d84aff3818be2b0d73e731689cc374261b016d17d46f8381962fb4a1577ba3017b1f23509d894f6e66431f988c00889e.js" integrity="sha512-6J/aDym5XTP29CJN2eXPadhK/zgYvisNc&#43;cxaJzDdCYbAW0X1G&#43;DgZYvtKFXe6MBex8jUJ2JT25mQx&#43;YjACIng=="></script>



Expand Down
39 changes: 20 additions & 19 deletions about/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@
<html><head lang="en">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"><title>About - jpnt website</title><meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Welcome to my personal blog!
My name is João Pinto and my passions are Programming, Operating Systems, Low Level Computing and Computer Networking.
Usually I will use the &ldquo;jpnt&rdquo; acronym because it sounds cool.
<meta name="description" content="Welcome to my personal blog :-)
I am João Pinto and my passions are Application Programming, Operating Systems, Embedded Systems, IoT, Computer Architecture and the like.
Usually I use the &ldquo;jpnt&rdquo; acronym because it sounds cool.
At the moment, I am studying at ISEP.
I code mostly with C, Java, Rust and Python.
I code mostly with C, Java, Rust and Python. I am open to work on anything.
Check out my projects here" />
<meta property="og:image" content=""/>
<meta property="og:url" content="https://jpnt.github.io/about/">
<meta property="og:site_name" content="jpnt website">
<meta property="og:title" content="About">
<meta property="og:description" content="Welcome to my personal blog!
My name is João Pinto and my passions are Programming, Operating Systems, Low Level Computing and Computer Networking.
Usually I will use the “jpnt” acronym because it sounds cool.
<meta property="og:description" content="Welcome to my personal blog :-)
I am João Pinto and my passions are Application Programming, Operating Systems, Embedded Systems, IoT, Computer Architecture and the like.
Usually I use the “jpnt” acronym because it sounds cool.
At the moment, I am studying at ISEP.
I code mostly with C, Java, Rust and Python.
I code mostly with C, Java, Rust and Python. I am open to work on anything.
Check out my projects here">
<meta property="og:locale" content="en_us">
<meta property="og:type" content="article">
<meta property="article:published_time" content="2021-07-30T12:59:15+00:00">
<meta property="article:modified_time" content="2021-07-30T12:59:15+00:00">
<meta property="article:published_time" content="2024-08-18T00:00:00+00:00">
<meta property="article:modified_time" content="2024-08-18T00:00:00+00:00">

<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="About">
<meta name="twitter:description" content="Welcome to my personal blog!
My name is João Pinto and my passions are Programming, Operating Systems, Low Level Computing and Computer Networking.
Usually I will use the “jpnt” acronym because it sounds cool.
<meta name="twitter:description" content="Welcome to my personal blog :-)
I am João Pinto and my passions are Application Programming, Operating Systems, Embedded Systems, IoT, Computer Architecture and the like.
Usually I use the “jpnt” acronym because it sounds cool.
At the moment, I am studying at ISEP.
I code mostly with C, Java, Rust and Python.
I code mostly with C, Java, Rust and Python. I am open to work on anything.
Check out my projects here">
<script src="https://jpnt.github.io/js/feather.min.js"></script>

Expand Down Expand Up @@ -73,18 +73,19 @@
<article>
<div class="title">
<h1 class="title">About</h1>
<div class="meta">Posted on Jul 30, 2021</div>
<div class="meta">Posted on Aug 18, 2024</div>
</div>




<section class="body">
<p>Welcome to my personal blog!</p>
<p>My name is João Pinto and my passions are Programming, Operating Systems, Low Level Computing and Computer Networking.</p>
<p>Usually I will use the &ldquo;jpnt&rdquo; acronym because it sounds cool.</p>
<p>Welcome to my personal blog :-)</p>
<p>I am João Pinto and my passions are Application Programming, Operating Systems,
Embedded Systems, IoT, Computer Architecture and the like.</p>
<p>Usually I use the &ldquo;jpnt&rdquo; acronym because it sounds cool.</p>
<p>At the moment, I am studying at ISEP.</p>
<p>I code mostly with C, Java, Rust and Python.</p>
<p>I code mostly with C, Java, Rust and Python. I am open to work on anything.</p>
<p>Check out my projects <a href="https://github.com/jpnt">here</a></p>

</section>
Expand Down

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions categories/page/1/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<title>http://localhost:1313/categories/</title>
<link rel="canonical" href="http://localhost:1313/categories/">
<title>https://jpnt.github.io/categories/</title>
<link rel="canonical" href="https://jpnt.github.io/categories/">
<meta name="robots" content="noindex">
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=http://localhost:1313/categories/">
<meta http-equiv="refresh" content="0; url=https://jpnt.github.io/categories/">
</head>
</html>
Binary file added images/favicon.ico
Binary file not shown.
Binary file added images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 11 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@



<section class="list-item">
<h1 class="title"><a href="/posts/abstraction/">Abstraction</a></h1>
<time>Aug 19, 2024</time>
<br><div class="description">

The purpose of abstraction and the &#34;fullstack&#34; computer model

</div>
<a class="readmore" href="/posts/abstraction/">Read more ⟶</a>
</section>

<section class="list-item">
<h1 class="title"><a href="/posts/linux-audio-guide/">Linux Audio Guide</a></h1>
<time>Aug 18, 2024</time>
Expand Down Expand Up @@ -159,17 +170,6 @@ <h1 class="title"><a href="/posts/pointers/">Pointers</a></h1>
<a class="readmore" href="/posts/pointers/">Read more ⟶</a>
</section>

<section class="list-item">
<h1 class="title"><a href="/posts/voidlinux-steam/">Steam on Void Linux</a></h1>
<time>May 30, 2022</time>
<br><div class="description">

How to install the Steam gaming platform on Void

</div>
<a class="readmore" href="/posts/voidlinux-steam/">Read more ⟶</a>
</section>



<ul class="pagination">
Expand Down
23 changes: 15 additions & 8 deletions index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,22 @@
<generator>Hugo</generator>
<language>en-us</language>
<copyright>© João Pinto</copyright>
<lastBuildDate>Sun, 18 Aug 2024 00:00:00 +0000</lastBuildDate>
<lastBuildDate>Mon, 19 Aug 2024 00:00:00 +0000</lastBuildDate>
<atom:link href="https://jpnt.github.io/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Abstraction</title>
<link>https://jpnt.github.io/posts/abstraction/</link>
<pubDate>Mon, 19 Aug 2024 00:00:00 +0000</pubDate>
<guid>https://jpnt.github.io/posts/abstraction/</guid>
<description>&amp;ldquo;The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise.&amp;rdquo; &amp;ndash; Edsger Dijkstra&#xA;&amp;ldquo;Abstraction enables designers to focus on a manageable subset of the system at a time.&amp;rdquo;&#xA;Abstraction and the reality of the &amp;ldquo;fullstack&amp;rdquo; spectrum in I.T. Abstraction is the core principle of information technology. It is how we in the field manage the immense complexity inherent in our systems.</description>
</item>
<item>
<title>About</title>
<link>https://jpnt.github.io/about/</link>
<pubDate>Sun, 18 Aug 2024 00:00:00 +0000</pubDate>
<guid>https://jpnt.github.io/about/</guid>
<description>Welcome to my personal blog :-)&#xA;I am João Pinto and my passions are Application Programming, Operating Systems, Embedded Systems, IoT, Computer Architecture and the like.&#xA;Usually I use the &amp;ldquo;jpnt&amp;rdquo; acronym because it sounds cool.&#xA;At the moment, I am studying at ISEP.&#xA;I code mostly with C, Java, Rust and Python. I am open to work on anything.&#xA;Check out my projects here</description>
</item>
<item>
<title>Linux Audio Guide</title>
<link>https://jpnt.github.io/posts/linux-audio-guide/</link>
Expand Down Expand Up @@ -149,12 +163,5 @@
<guid>https://jpnt.github.io/posts/disable-suspend/</guid>
<description>Disable / Mask services using systemctl sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target Edit &amp;ldquo;/etc/systemd/logind.conf&amp;rdquo; to avoid errors and high CPU usage HandleSuspendKey=ignore HandleHibernateKey=ignore HandleLidSwitch=ignore HandleLidSwitchExternalPower=ignore HandleLidSwitchDocked=ignore Restart systemd-logind sudo systemctl restart systemd-logind Check for errors journalctl -xe That&amp;rsquo;s it!</description>
</item>
<item>
<title>About</title>
<link>https://jpnt.github.io/about/</link>
<pubDate>Fri, 30 Jul 2021 12:59:15 +0000</pubDate>
<guid>https://jpnt.github.io/about/</guid>
<description>Welcome to my personal blog!&#xA;My name is João Pinto and my passions are Programming, Operating Systems, Low Level Computing and Computer Networking.&#xA;Usually I will use the &amp;ldquo;jpnt&amp;rdquo; acronym because it sounds cool.&#xA;At the moment, I am studying at ISEP.&#xA;I code mostly with C, Java, Rust and Python.&#xA;Check out my projects here</description>
</item>
</channel>
</rss>
36 changes: 36 additions & 0 deletions js/code-copy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
(() => {

function createCopyButton(codeNode) {
const copyBtn = document.createElement('button')
copyBtn.className = 'code-copy-btn'
copyBtn.type = 'button'
copyBtn.innerText = 'copy'

let resetTimer
copyBtn.addEventListener('click', () => {
navigator.clipboard.writeText(codeNode.innerText).then(() => {
copyBtn.innerText = 'copied!'
}).then(() => {
clearTimeout(resetTimer)
resetTimer = setTimeout(() => {
copyBtn.innerText = 'copy'
}, 1000)
})
})

return copyBtn
}

document.querySelectorAll('pre > code')
.forEach((codeNode) => {
const copyBtn = createCopyButton(codeNode);
const preNode = codeNode.parentNode
codeNode.parentNode.insertBefore(copyBtn, codeNode)
})

document.querySelectorAll('.highlight table > tbody > tr > td:first-child .code-copy-btn')
.forEach((btn) => {
btn.remove()
})

})()
154 changes: 154 additions & 0 deletions js/search.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
// A local search script with the help of
// [hexo-generator-search](https://github.com/PaicHyperionDev/hexo-generator-search)
// Copyright (C) 2015
// Joseph Pan <http://github.com/wzpan>
// Shuhao Mao <http://github.com/maoshuhao>
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
// 02110-1301 USA
//
// Modified by:
// Pieter Robberechts <http://github.com/probberechts>

/*exported searchFunc*/
var searchFunc = function(path, searchId, contentId) {

function stripHtml(html) {
html = html.replace(/<style([\s\S]*?)<\/style>/gi, "");
html = html.replace(/<script([\s\S]*?)<\/script>/gi, "");
html = html.replace(/<figure([\s\S]*?)<\/figure>/gi, "");
html = html.replace(/<\/div>/ig, "\n");
html = html.replace(/<\/li>/ig, "\n");
html = html.replace(/<li>/ig, " * ");
html = html.replace(/<\/ul>/ig, "\n");
html = html.replace(/<\/p>/ig, "\n");
html = html.replace(/<br\s*[\/]?>/gi, "\n");
html = html.replace(/<[^>]+>/ig, "");
return html;
}

function getAllCombinations(keywords) {
var i, j, result = [];

for (i = 0; i < keywords.length; i++) {
for (j = i + 1; j < keywords.length + 1; j++) {
result.push(keywords.slice(i, j).join(" "));
}
}
return result;
}

$.ajax({
url: path,
dataType: "xml",
success: function(xmlResponse) {
// get the contents from search data
var datas = $("entry", xmlResponse).map(function() {
return {
title: $("title", this).text(),
content: $("content", this).text(),
url: $("link", this).attr("href")
};
}).get();

var $input = document.getElementById(searchId);
if (!$input) { return; }
var $resultContent = document.getElementById(contentId);

$input.addEventListener("input", function(){
var resultList = [];
var keywords = getAllCombinations(this.value.trim().toLowerCase().split(" "))
.sort(function(a,b) { return b.split(" ").length - a.split(" ").length; });
$resultContent.innerHTML = "";
if (this.value.trim().length <= 0) {
return;
}
// perform local searching
datas.forEach(function(data) {
var matches = 0;
if (!data.title || data.title.trim() === "") {
data.title = "Untitled";
}
var dataTitle = data.title.trim().toLowerCase();
var dataContent = stripHtml(data.content.trim());
var dataUrl = data.url;
var indexTitle = -1;
var indexContent = -1;
var firstOccur = -1;
// only match artiles with not empty contents
if (dataContent !== "") {
keywords.forEach(function(keyword) {
indexTitle = dataTitle.indexOf(keyword);
indexContent = dataContent.indexOf(keyword);

if( indexTitle >= 0 || indexContent >= 0 ){
matches += 1;
if (indexContent < 0) {
indexContent = 0;
}
if (firstOccur < 0) {
firstOccur = indexContent;
}
}
});
}
// show search results
if (matches > 0) {
var searchResult = {};
searchResult.rank = matches;
searchResult.str = "<li><a href='"+ dataUrl +"' class='search-result-title'>"+ dataTitle +"</a>";
if (firstOccur >= 0) {
// cut out 100 characters
var start = firstOccur - 20;
var end = firstOccur + 80;

if(start < 0){
start = 0;
}

if(start == 0){
end = 100;
}

if(end > dataContent.length){
end = dataContent.length;
}

var matchContent = dataContent.substr(start, end);

// highlight all keywords
var regS = new RegExp(keywords.join("|"), "gi");
matchContent = matchContent.replace(regS, function(keyword) {
return "<em class=\"search-keyword\">"+keyword+"</em>";
});

searchResult.str += "<p class=\"search-result\">" + matchContent +"...</p>";
}
searchResult.str += "</li>";
resultList.push(searchResult);
}
});
resultList.sort(function(a, b) {
return b.rank - a.rank;
});
var result ="<ul class=\"search-result-list\">";
for (var i = 0; i < resultList.length; i++) {
result += resultList[i].str;
}
result += "</ul>";
$resultContent.innerHTML = result;
});
}
});
};
Loading

0 comments on commit ecd3aeb

Please sign in to comment.