big change

This commit is contained in:
Michael Zhang 2019-06-29 13:04:30 -05:00
parent f0b5d586d5
commit 84c4ee60c5
No known key found for this signature in database
GPG key ID: 5BAEFE5D04F0CE6C
9 changed files with 71 additions and 43 deletions

View file

@ -14,5 +14,5 @@ nav_links = [
{ url = "/", text = "home" }, { url = "/", text = "home" },
{ url = "/pages/about", text = "about" }, { url = "/pages/about", text = "about" },
{ url = "/pages", text = "all pages" }, { url = "/pages", text = "all pages" },
{ url = "https://git.iptq.io/michael", text = "projects" }, { url = "https://git.iptq.io/michael", text = "projects »" },
] ]

View file

@ -3,5 +3,6 @@ title = "home"
template = "blog.html" template = "blog.html"
page_template = "post.html" page_template = "post.html"
insert_anchor_links = "right"
sort_by = "date" sort_by = "date"
+++ +++

View file

@ -2,4 +2,5 @@
title = "all pages" title = "all pages"
template = "listing.html" template = "listing.html"
page_template = "post.html" page_template = "post.html"
insert_anchor_links = "right"
+++ +++

View file

@ -6,22 +6,6 @@ Hi there! I'm a Computer Science student at the University of Minnesota, and I'v
In an effort to rely on less services, I started doing a lot of self-hosting and rewriting of software. Check out some of the projects I'm doing over on my public [Gitea](https://git.iptq.io)! In an effort to rely on less services, I started doing a lot of self-hosting and rewriting of software. Check out some of the projects I'm doing over on my public [Gitea](https://git.iptq.io)!
### setup
My setup can be found [here](/pages/setup).
### languages
Here's some of the languages I like, in approximate order of my skill/confidence in using them:
- **Rust** I can't say I'm fluent in Rust, but writing code in Rust just feels right. Most of my recent projects have been done in Rust.
- **Go** I like the way this language is opinionated, and makes for very clean code. Unfortunately, because of their design decisions it's relatively lacking in language features.
- **Python** One of my favorite languages by far. Aside from its weakness in performance, I love how the language looks. I do have several bones to pick, especially towards its dependency ecosystem.
- **JavaScript** Although I'm trying to step away from JavaScript, I find myself using it from time to time simply out of ease of use and plethora of libraries.
- **C** Largely prefer this over C++ because of much finer control over what's happening.
- **OCaml** Learned this from a functional programming class, and I still use it from time to time; I kinda see it as the "Python" of functional languages.
- **C++** Good for when I did competitive programming because of its very comprehensive standard library.
If you want my resume, contact me through one of these means: If you want my resume, contact me through one of these means:
## contact ## contact
@ -29,3 +13,7 @@ If you want my resume, contact me through one of these means:
- Discord: **iptq#8440** - Discord: **iptq#8440**
- Email: (I sign all my Git commits with this email) - Email: (I sign all my Git commits with this email)
- PGP Key: [hosted on Keybase](https://keybase.io/michaelz/pgp_keys.asc?fingerprint=2a323c176e16b8c25ade02d447033f6c0a02f24a) - PGP Key: [hosted on Keybase](https://keybase.io/michaelz/pgp_keys.asc?fingerprint=2a323c176e16b8c25ade02d447033f6c0a02f24a)
## setup
My setup can be found [here](/pages/setup).

View file

@ -1,37 +1,43 @@
+++ +++
title = "my setup" title = "my setup"
[extra]
toc = true
+++ +++
## desktop ## laptop
I'm using Arch Linux on my personal machine. Here's a neofetch: I'm using Arch Linux on my personal machine. Here's a neofetch:
``` ```
# michael @ arch in ~ [16:42:51] # michael @ kawa in ~ [12:42:16]
$ neofetch $ neofetch
-` michael@arch -` michael@kawa
.o+` ------------ .o+` ------------
`ooo/ OS: Arch Linux x86_64 `ooo/ OS: Arch Linux x86_64
`+oooo: Host: K501UX 1.0 `+oooo: Host: K501UX 1.0
`+oooooo: Kernel: 4.18.5-arch1-1-ARCH `+oooooo: Kernel: 5.1.8-arch1-1-ARCH
-+oooooo+: Uptime: 1 hour, 47 mins -+oooooo+: Uptime: 10 hours, 32 mins
`/:-:++oooo+: Packages: 1143 (pacman) `/:-:++oooo+: Packages: 960 (pacman), 242 (nix)
`/++++/+++++++: Shell: zsh 5.5.1 `/++++/+++++++: Shell: zsh 5.7.1
`/++++++++++++++: Resolution: 1920x1080 `/++++++++++++++: Resolution: 1920x1080
`/+++ooooooooooooo/` WM: i3 `/+++ooooooooooooo/` Theme: Adwaita [GTK2/3]
./ooosssso++osssssso+` Theme: Adwaita [GTK2/3] ./ooosssso++osssssso+` Icons: Adwaita [GTK2/3]
.oossssso-````/ossssss+` Icons: Adwaita [GTK2/3] .oossssso-````/ossssss+` Terminal: alacritty
-osssssso. :ssssssso. Terminal: alacritty -osssssso. :ssssssso. CPU: Intel i7-6500U (4) @ 3.100GHz
:osssssss/ osssso+++. Terminal Font: Roboto Mono for Powerline :osssssss/ osssso+++. GPU: NVIDIA GeForce GTX 950M
/ossssssss/ +ssssooo/- CPU: Intel i7-6500U (4) @ 3.100GHz /ossssssss/ +ssssooo/- GPU: Intel Skylake GT2 [HD Graphics 520]
`/ossssso+/:- -:/+osssso+- GPU: NVIDIA GeForce GTX 950M `/ossssso+/:- -:/+osssso+- Memory: 3789MiB / 7867MiB
`+sso+:-` `.-/+oso: GPU: Intel Skylake GT2 [HD Graphics 520] `+sso+:-` `.-/+oso:
`++:. `-/+/ Memory: 6708MiB / 7871MiB `++:. `-/+/
.` `/ .` `/
``` ```
For my desktop environment, I've got [i3](https://i3wm.org/), a tiling window manager. I like it because it's lightweight and doesn't use much battery. My config can be found [here](https://git.iptq.io/michael/dotfiles/src/branch/master/.config/i3/config). I tried i3gaps at one point but didn't feel like trying to fix the rendering artifacts so I switched back. My desktop environment is [i3](https://i3wm.org) on X11. I like it because it's lightweight and doesn't use much battery. Even after many years my laptop can still sustain 5-6 hours of prolonged usage.
### email
### coding ### coding
@ -43,19 +49,37 @@ For passwords, I'm using [pass](https://www.passwordstore.org/), which is a GPG-
### music ### music
On my personal computer, I'm using [mpd](https://www.musicpd.org/), the music player daemon along with [sonata](https://www.nongnu.org/sonata/), which is a GTK frontend. I like using mpd because this also allows me to display my current playing song in my i3 bar. On my personal computer, I'm using [mpd](https://www.musicpd.org/), the music player daemon along with [Cantata](https://github.com/CDrummond/cantata), which is a Qt frontend. I like using mpd because this also allows me to display my current playing song in my i3 bar.
### screenshot ### screenshot
I'm using a [custom screenshot tool](https://git.iptq.io/michael/leanshot). I'm using a [custom screenshot tool](https://git.iptq.io/michael/leanshot), written by myself using Rust. The advantage of this over something like scrot or maim would be the ability to first freeze the screen before selecting a region.
## my phone
My phone is running the latest version of LineageOS without Google Apps, in a small effort to liberate myself from Google services. Most of the apps that I need notifications from on my phone can contact servers directly without going through Google's Firebase Cloud Messaging, which is where push notifications traditionally go.
First, here's a list of free software that I use, available from [F-Droid](https://f-droid.org/en/), a free-software app store:
- [DAVx5](https://f-droid.org/en/packages/at.bitfire.davdroid/). Great for syncing my calendar, contacts, and todo list between my computer and my phone. With a self-hosted CalDAV server, my data is in my hands.
- [DNSFilter](https://f-droid.org/en/packages/dnsfilter.android). Creates a local VPN and selectively blocks requests based on existing blacklists. This actually filters a lot of advertising and tracking data on the regular.
- [Termux](https://f-droid.org/en/packages/com.termux/). It's a terminal on your phone. Why not?
- [Weechat Android](https://f-droid.org/en/packages/com.ubergeek42.WeechatAndroid/). Weechat is an IRC client that can act like a server. With this app, my phone connects to that server and retrieves messages, including sending me notifications for new highlights and such.
Other software I use include:
- [Authy](https://authy.com/). Unfortunately, until I figure out my 2-factor backup plan, I'm going to have to stick with Authy since it handles backups well. The long-term solution here is to use backup codes, but I haven't gotten around to sorting that out yet.
- [Firefox](https://www.mozilla.org/en-US/firefox/mobile/). Yes, Firefox is on Android.
- [Signal](https://signal.org/). Encrypted chat that uses phone numbers for identity so you can basically replace SMS with almost no user-interface changes.
And a slew of other non-free apps that have pretty specific uses, though I think I've crippled my phone to the point where many of those apps are unusable. One of these days I'll go in and purge them again.
## this website ## this website
The stack for this website looks like: The stack for this website looks like:
- The [source code](https://git.iptq.io/michael/blog) is written as a set of Gutenberg config files. - The [source code](https://git.iptq.io/michael/blog) is written as a set of Gutenberg config files.
- This is then transpiled into static HTML + resources using [Gutenberg](https://www.getgutenberg.io/), a static site generator. - This is then transpiled into static HTML + resources using [Zola](https://getzola.org/), a static site generator written with Rust.
- Changes are deployed using Git hooks.
- Static files are served from a web root using [nginx](https://nginx.org/en/) through a virtual host. - Static files are served from a web root using [nginx](https://nginx.org/en/) through a virtual host.
- And here it is! - And here it is!
For deployment, I'm using [dip](https://github.com/acmumn/dip), a customizable webhook server that I wrote that rebuilds the source code on push.

View file

@ -1,5 +1,7 @@
@import "syntax.scss"; @import "syntax.scss";
$monofont: "Roboto Mono", "Roboto Mono for Powerline", "Inconsolata", "Consolas", monospace;
html { html {
background-color: lightskyblue; background-color: lightskyblue;
} }
@ -36,9 +38,19 @@ a {
&:hover { &:hover {
text-decoration: underline; text-decoration: underline;
} }
&.permalink {
color: lighten(royalblue, 25%);
font-size: 0.65em;
}
}
#content {
line-height: 1.25em;
} }
pre { pre {
padding: 5px; padding: 5px;
overflow-x: auto; overflow-x: auto;
font-family: $monofont;
} }

View file

@ -0,0 +1,2 @@
 
<a href="#{{ id }}" class="permalink">(permalink)</a>

View file

@ -5,7 +5,7 @@
<div id="nav"> <div id="nav">
{% for link in config.extra.nav_links %} {% for link in config.extra.nav_links %}
{% if loop.index > 1 %}&middot;{% endif %} {% if loop.index > 1 %}&middot;{% endif %}
<a href="{{ link.url | safe }}" class="link">{{ link.text | replace(from=" ", to="&nbsp;") }}</a> <a href="{{ link.url | safe }}" class="link">{{ link.text | replace(from=" ", to="&nbsp;") | safe }}</a>
{% endfor %} {% endfor %}
</div> </div>
</div> </div>

View file

@ -18,10 +18,10 @@
</small> </small>
{% endif %} {% endif %}
{% if page.extra.toc and page.toc | length %} {% if page.extra.toc and toc | length %}
<div class="toc"> <div class="toc">
table of contents table of contents
{{ post::render_toc(toc=page.toc) }} {{ post::render_toc(toc=toc) }}
</div> </div>
{% endif %} {% endif %}