Skip to content

Commit

Permalink
refactor: replace types tag with typing
Browse files Browse the repository at this point in the history
  • Loading branch information
AshGw committed Apr 30, 2024
1 parent 241083d commit 7ad9754
Show file tree
Hide file tree
Showing 9 changed files with 227 additions and 10 deletions.
1 change: 1 addition & 0 deletions public/blogs/async-python.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ minutesToRead: 7
tags:
- 'python'
- 'async'
- 'typing'
---
<C>
You may have encountered explanations that appear overly simplistic, merely emphasizing the importance of async programming without delving into the mechanics or exploring high-level APIs such as the <L href="https://github.com/python/cpython/tree/main/Lib/asyncio">`asyncio`</L> module in the standard library. Clearly, you already understand the significance and use cases, so let's cut to the chase and see how it actually works.
Expand Down
2 changes: 1 addition & 1 deletion public/blogs/branded-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ firstModDate: 2024-04-27T09:15:00-0401
minutesToRead: 3
tags:
- 'typescript'
- 'types'
- 'typing'
- 'quality'
---

Expand Down
2 changes: 1 addition & 1 deletion public/blogs/param-spec.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ firstModDate: 2021-10-02T09:15:00-0401
minutesToRead: 2
tags:
- 'python'
- 'types'
- 'typing'
- 'paramspec'
---
<C>
Expand Down
2 changes: 1 addition & 1 deletion public/blogs/python-protocols.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ firstModDate: 2020-01-02T09:15:00-0401
minutesToRead: 4
tags:
- 'python'
- 'types'
- 'typing'
- 'protocols'
---

Expand Down
216 changes: 216 additions & 0 deletions public/blogs/signed-commites.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
---
title: Verified Commits
seoTitle: Quick guide for the impatient on how to use GPG and SSH to sign commits, on GitHub
summary: Sign commits with SSH and GPG
isReleased: true
isSequel: false
lastModDate: 2019-12-05T09:15:00-0401
firstModDate: 2019-12-05T09:15:00-0401
minutesToRead: 4
tags:
- 'SSH'
- 'GPG'
- 'git'
---
<C>
*Guide for the impatient*
</C>
<H2>Only Using SSH To Sign Commits</H2>
<C>First generate an SSH key, you must have ``ssh`` installed, to verify, run this</C>
<Code
code={`ssh -V
`}
language="shell"
showLineNumbers={false}
/>
<C>
You should get the version info, with no errors.
</C>
<C>
To generate keys for GitHub specifically, here I'll save you some time, paste <L href="https://github.com/AshGw/dotfiles/blob/main/.ssh/_gh_gen.sh">this</L> in your terminal.
</C>
<C>
This will will generate an SSH key pair, `ashgw` is my username, yours will be different.
</C>
<Code
code={`Generating public/private ed25519 key pair.
Created directory '/home/ashgw/.ssh'.
Enter passphrase (empty for no passphrase):`}
language="shell"
showLineNumbers={false}
/>
<C>
Optionally enter a key phrase, that's on you.
</C>
<Code
code={`Your identification has been saved in /home/ashgw/.ssh/github
Your public key has been saved in /home/ashgw/.ssh/github.pub
The key fingerprint is:
SHA256:A7vCUer8pc+IPmTOHS5ULS4hOXX4SElUA0lbVj9SbgI ashgw@ashx
The key's randomart image is:
+--[ED25519 256]--+
| +=*E.. . |
| *+.o + |
| +.+o.o = |
| + oo+o.+ . |
| oo+..S |
| +=.o. . |
| *=+... |
| =+o= |
| .oo+.o |
+----[SHA256]-----+
Agent pid 3606
Identity added: /home/ashgw/.ssh/github (ashgw@ashx)
➜ ~`}
language="shell"
showLineNumbers={false}
/>
<C>
You should get the same output with no problems.
Now if you run the command, while `xclip` is installed, the public key will be copied to your clipboard, if you don't have `xclip`, then manually copy it.
</C>
<Code
code={`cat ~/.ssh/github.pub`}
language="shell"
showLineNumbers={false}
/>
<C>You should get the public key</C>
<Code
code={`➜ ~ cat ~/.ssh/github.pub
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMoih/l+dazF/waAOFry1h0i5kT4+cislDxfFRreE2I2 ashgw@ashx
➜ ~ `}
language="shell"
showLineNumbers={false}
/>
<H2>Where To Paste It?</H2>
<C>
Go <L href='https://github.com/settings/keys'>here</L>, Under SSH keys section, you'll find an "authentication keys" section as well as "signing key" section, paste your public key in **BOTH**. Before that works though, you need to modify your ``~/.gitconfig``
</C>
<Code
code={`[user]
email = <YOUR_ACTUAL_VERIFIED_EMAIL_ON_GITHUB>
name = <YOUR_NAME_CAN_BE_FAKE_THO>
signingkey = /home/<YOUR_USERNAME_HERE>/.ssh/github.pub
# other stuff ...`}
language="shell"
showLineNumbers={false}
/>
<C>
That's it. If you're wondering what else can be put inside ``~/.gitconfig`` you can checkout mine <L href='https://github.com/AshGw/dotfiles/blob/main/.gitconfig'>here</L>. Now your commits will be verified.
</C>
<H2>Connect With SSH, Sign With GPG</H2>
<C>
Do the steps above, then try to clone one of your repo's with `SSH`, if not problem occurs, you're good. Next, you must have `gpg` installed. You're probably on ``Debian``, here's how to cop it.
</C>
<Code
code={`sudo apt update && install gnupg`}
language="shell"
showLineNumbers={false}
/>

<C>
Verify with:
</C>

<Code
code={`gpg -version `}
language="shell"
showLineNumbers={false}
/>

<C>
Second, if you don't have a key laying around, generate a new one with:
</C>

<Code
code={`gpg --full-generate-key`}
language="shell"
showLineNumbers={false}
/>

<C>
If you've successfully generated your key, then if you list your keys with
</C>

<Code
code={`➜ ~ gpg -k `}
language="shell"
showLineNumbers={false}
/>

<C>
You should get something like this
</C>

<Code
code={`➜ ~ gpg -k
/home/ashgw/.gnupg/pubring.kbx
------------------------------
pub rsa4096 2018-02-20 [SC]
79821E0224D34EC4969FF6A8E5168EE090AE80D0
uid [ultimate] Ashref Gwader (personal) <ashrefgw@proton.me>
sub rsa4096 2018-02-20 [E]
➜ ~`}
language="shell"
showLineNumbers={false}
/>

<C>
You see that large number? That's your key ID. Copy it and paste it in your ``~/.gitconfig`` file
</C>

<Code
code={`[user]
email = <SAME_AS_ABOVE>
name = <SAME_AS_ABOVE>
signingkey = <THAT_ID>
[gpg] # mandatory
program = gpg
[commit] # mandatory
gpgsign = true
# other stuff...`}
language="shell"
showLineNumbers={false}
/>

<C>
Next thing you need to export your public GPG key.
</C>



<Code
code={`gpg --armor --export <THAT_KEY_ID> | xclip -selection clipboard`}
language="shell"
showLineNumbers={false}
/>


<C>
If you have `xclip` installed you'll get it copied to your clipboard, else, just run this
</C>

<Code
code={`gpg --armor --export <THAT_KEY_ID> `}
language="shell"
showLineNumbers={false}
/>

<C>
You'll get your public key ID, it should start with
</C>
<Code
code={`-----BEGIN PGP PUBLIC KEY BLOCK-----`}
language="shell"
showLineNumbers={false}
/>
<C>
It's a long chain of characters, you can find mine <L href="https://github.com/ashgw.gpg">here</L>, yours will be there too if you use it to sign commits, at `https://github.com/<YOUR_USERNAME>.gpg`.

Next, take the key you just copied and paste it <L href='https://github.com/settings/gpg/new'>here</L>, give the key a title so you don't forget it and paste the public key.
That's it, your commits are now verified with your ``GPG`` key, while you're still able to use ``SSH`` with GitHub.
</C>
2 changes: 1 addition & 1 deletion public/services/all.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Leading the charge of a globally distributed <L href="/services/glossary#team">
</C>
<H3>Code Audits</H3>
<C>
I conduct thorough <L href="/blog/independent-code-audit">independent audits</L> to review and analyze your software code <L href="/blog/software-quality">quality</L> and architectural decisions. During these audits, I provide detailed insights, identify areas for improvement, pinpoint potential vulnerabilities, and highlight optimization opportunities.
I conduct thorough <L href="/blog/independent-code-audit">independent audits</L> to review and analyze your software code <L href="/blog/tag/quality">quality</L> and architectural decisions. During these audits, I provide detailed insights, identify areas for improvement, pinpoint potential vulnerabilities, and highlight optimization opportunities.
<S/>
<L href="/services/code-audits">Learn more</L>
</C>
Expand Down
6 changes: 3 additions & 3 deletions public/services/code-audits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ tags:
I wrote an <L href="/blog/independent-code-audit">article</L> about why your software needs independent code audits.
</C>
<C>
In short, I talked about how independent audits can help mitigate issues stemming from a lack of oversight within internal teams (here's <L href="/blog/management-skill-issues">why</L>).
Without vigilant scrutiny of <L href="/blog/software-quality">quality</L> and architectural integrity, problems can escalate unnoticed, hindering future development, which leads to project failures and loss of money.
In short, I talked about how independent audits can help mitigate issues stemming from a lack of oversight within internal teams (here's <L href="/blog/tag/skill-issues">why</L>).
Without vigilant scrutiny of <L href="/blog/tag/quality">quality</L> and architectural integrity, problems can escalate unnoticed, hindering future development, which leads to project failures and loss of money.
</C>
<C>
I only audit for projects that use my <L href="/about">stack.</L>
</C>
<H3>Business</H3>
<C>
The business audit is designed for business owners seeking clarity on their project's status. It provides a concise one-page review covering crucial aspects such as suitability for future modifications, flexibility in team adjustments and [code quality](http://localhost:3000/services/code-audits) assessment. Additionally, clients are free to ask questions pose specific inquiries to address their unique concerns.
The business audit is designed for business owners seeking clarity on their project's status. It provides a concise one-page review covering crucial aspects such as suitability for future modifications, flexibility in team adjustments and code quality assessment. Additionally, clients are free to ask questions pose specific inquiries to address their unique concerns.
<S3/>
My business audit is a fixed one-day service priced at **$500**.
</C>
Expand Down
4 changes: 2 additions & 2 deletions public/services/deadlines.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ tags:
- 'timeframe'
---
<C>
A deadline signifies more than just a point in time when work should be completed. It indicates that the project must be operational in a real-world production environment by that date **without** sacrificing <L href="/blog/software-quality">quality.</L> Simply regarding it as the moment to submit source code is shortsighted and ultimately dissatisfying for the client. And by deadline I don't mean the classical sprint deadlines.
A deadline signifies more than just a point in time when work should be completed. It indicates that the project must be operational in a real-world production environment by that date **without** sacrificing <L href="/blog/tag/quality">quality.</L> Simply regarding it as the moment to submit source code is shortsighted and ultimately dissatisfying for the client. And by deadline I don't mean the classical sprint deadlines.
</C>

<C>
Expand All @@ -26,7 +26,7 @@ Instead of adhering to traditional sprints with predetermined timelines for impl
<L href='/blog/project-exstimates'>Estimating</L> future progress is based on tracking the completion of these tickets over time, rather than predicting how much can be done within an arbitrarily defined classical "sprint" period. And by monitoring the rate of ticket completion, we can forecast project progress more accurately and adjust <L href='#prioritized'>priorities</L> accordingly.
</C>
<C>
This also reduces risk by minimizing the chances of encountering unforeseen complications in large and complex tasks. It allows for a steady flow of completed work. If an <L href='/services/glossary#ticket'>issue</L> is particularly challenging, we can work on multiple tasks simultaneously without disruption. On top of that, code reviews become more manageable and efficient with smaller and laser focused units of work, which in turn enhances overall <L href='/blog/software-quality'>quality</L> while reducing overhead.
This also reduces risk by minimizing the chances of encountering unforeseen complications in large and complex tasks. It allows for a steady flow of completed work. If an <L href='/services/glossary#ticket'>issue</L> is particularly challenging, we can work on multiple tasks simultaneously without disruption. On top of that, code reviews become more manageable and efficient with smaller and laser focused units of work, which in turn enhances overall <L href="/blog/tag/quality">quality</L> while reducing overhead.
</C>


Expand Down
2 changes: 1 addition & 1 deletion public/services/transparency.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tags:
- 'code audits'
---
<C>
Concealment often serves as a means of leverage, to manipulate clients into compliance or negotiate higher fees. Moreover, this secrecy may mask subpar <L href="/blog/software-quality">quality</L> until the project's completion, leaving the client dissatisfied after <L href="/services/billing">payment.</L>
Concealment often serves as a means of leverage, to manipulate clients into compliance or negotiate higher fees. Moreover, this secrecy may mask subpar <L href="/blog/tag/quality">quality</L> until the project's completion, leaving the client dissatisfied after <L href="/services/billing">payment.</L>
</C>

<C>
Expand Down

0 comments on commit 7ad9754

Please sign in to comment.