Moar stuff
Jes Olson jolson@digitalocean.com
Fri, 28 Jan 2022 23:49:42 -0600
35 files changed,
1892 insertions(+),
16 deletions(-)
jump to
A
idea/alpine-rock64.html
@@ -0,0 +1,73 @@
+# installing alpine linux on a rock64 + +note: these instructions do not work yet, this +document is still alive (and may be for quite awhile). + +alpine version: 3.12.3 +pine64 rock64: rock64-rk3328 +uboot build via: void linux + +note: /dev/sdx is assumed to be the device + that represents a microsd chip, adjust accordingly + +zero the sd card + + dd if=/dev/zero of=/dev/sdX bs=1M count=32 + +start fdisk to partition the sd card + + fdisk /dev/sdX + +at the fdisk prompt, create a single partition + +- type o to clear out partitions +- type p to list partitions, there should be 0 +- type n, then p, then 1, then 32768, then ENTER to make a single huge partition +- type w to exit and save changes + +create the ext4 fs + + mkfs.ext4 /dev/sdX1 + +mount the fs (i do this as root) + + mkdir root + mount /dev/sdX1 root + +download & extract the genericARM image from https://www.alpinelinux.org/downloads + + wget https://dl-cdn.alpinelinux.org/alpine/v3.12/releases/aarch64/alpine-uboot-3.12.3-aarch64.tar.gz + bsdtar -xpf alpine-uboot-3.12.3-aarch64.tar.gz -C root + # remove irrelevant dirs + rm -rf root/u-boot + rm -rf root/efi + +# wget https://trash.j3s.sh/rock64-boot.scr -O boot.scr + +download the u-boot dtb + ????? + +unmount + + umount root # this will take awhile + +download and install the uboot bootloader + +# wget https://trash.j3s.sh/u-boot-rockchip.bin +# dd if=u-boot-rockchip.bin of=/dev/sdX seek=64 conv=notrunc + +wget http://os.archlinuxarm.org/os/rockchip/boot/rock64/rksd_loader.img +wget http://os.archlinuxarm.org/os/rockchip/boot/rock64/u-boot.itb +dd if=rksd_loader.img of=/dev/sdX seek=64 conv=notrunc +dd if=u-boot.itb of=/dev/sdX seek=16384 conv=notrunc + +insert the microsd card and boot! + + + +#todo + +try /Image next in boot.scr + +TODO: check this out - https://github.com/krjdev/rock64_openbsd +
A
idea/building-a-fixed-gear-bicycle.html
@@ -0,0 +1,325 @@
+# Building a Fixed Gear Bicycle + +originally posted 2020-07-02 + +I have owned many bicycles over the years. Most of them have been excellent +travel companions, but one thing has always bothered me. No matter how well I +maintained them, my gears would grind and slip eventually, and I never had any +idea why - there were too many dang components crushed together down there. + +I like to fully understand the things I own. + +Bicycles are deceptively complicated! I decided to put together my own bicycle. +This meant I had to simplify as much as I could - and because I also care about +reliability, I decided to build a single gear bicycle. + +I wanted to share a little bit about why I decided to do this, what the +decision points were, and how you can get started if you're interested. + +Most people say that buying a fully kitted single speed will be cheaper than +building your own - I say we can build a better _and_ cheaper bike all on our +own. Let us begin. + + ___ + __ _|_ +((( (_)/ (_) + +## Theory + +So here's the sitch. + +Typical road bicycles have many speeds - this allows the rider to adjust the +gear ratio to match the terrain. One may use a very low gear to climb a hill +with little effort, or a high gear when riding very fast. There is no doubt +that modern multi-geared bicycles are efficient. + +However, they are complicated - and come with many hidden costs. Especially if +your goal is to ride around relatively flat terrain (a city, perhaps). + +-- Types + +There are generally two types of single-speed bicycle: + +* Fixed Gear +* Freewheel + +Both types are very similar - they have a single gear that turns at a fixed +gear ratio. The difference is simple - a freewheel allows for coasting, while a +fixed gear does not. If you ride a fixed gear bicycle, you must rotate your +legs along with the gear. + +At first glance, it may seem that fixed gears have a strict disadvantage to +freewheels, but this is not true - fixed gears come with their own sets of +benefits, including: + +* the ability to ride without brakes + (simply pedal backwards to slow down) + (this is not an endorsement of brakeless riding, always have at least 1 brake) +* extra exercise + (fixed gears exercise muscles that are not used while riding freewheel bicycles) +* drifting/skidding + (the ability to lock your back wheel in order to make sudden stops or sharp turns) + +Regardless, the choice is yours - there is a large subset of the single gear +community that prefers freewheels. I say try both for a few weeks each, and see +which you prefer. + +-- Simplicity + +Every part is visible and easy to understand. If a single speed bicycle breaks, +a novice can figure out why. I suggest that people who like old Ford Rangers, +or vim, are the same people who would like single speed bicycles. + +On a single speed bike, there are no: + +* derailleurs (front & rear) +* shift cables +* shifters +* long chainz +* spoke guards +* rear brakes/brake handles (this is not always true) + +-- Cost + +Single speed bicycles are cheaper than bicycles with many gears because they +have fewer parts. They can often be built for half the price or under. They are +also cheap and easy to repair. + +-- Reliability + +Properly built single speed bicycles are reliable. They require less +maintenance less often than their many-geared counterparts. They can be ridden +in the rain, thrown down on the ground, and tied to the top of a rusty car +without a single worry. + +-- Fun + +Single speed bicycles are more fun to ride (especially if you choose a fixed +gear, imo). + +-- Exercise + +Single speed bicycles are much better for your body - you must stand up and +pedal hard to make it up hills, and actively fight to go down them. This opens +up a whole new area of muscle usage. + +-- Efficiency + +Single speed bicycles are more efficient than multi-gear bicycles in very +particular conditions. Technically, the chain is shorter, more direct, and +doesn't have derailleur pulleys - so we gain something like 5% over our +multi-geared friends. While this may not seem like much, it makes a huge +difference if we're in a single gear on flat terrain. + +However, on inclines or declines (where your single gear isn't efficient), your +efficiency will fall off dramatically - like, 50% or more. There will be hills +you cannot bike up. You'll be red-faced and huffing while a multi-geared +bicycle gently drifts by. So don't be too snooty, that loss is part of the fun. +:) + +-- Weight + +Finally, single speed bikes weigh less than their cousins, which definitely +will matter seeing as you'll have to carry your bike up steep hills. :> + +## Parts + +Common sites to source parts from are: + +https://bikesdirect.com +https://bikeisland.com +https://retrogression.com +https://ebay.com +https://craigslist.com +https://pinkbike.com/buysell + +-- Frame + +(at most $200) + +It is critical that your frame fits you. Before you do anything else, measure +yourself and pump your figures into a calculator. I used this one: +https://www.ebicycles.com/bicycle-tools/frame-sizer/road-bike + +If you're an ordinary person, you'll want a steel frame. Aluminum frames, while +lighter, are harder to repair and cost more. Aluminum also feels worse to ride +on than steel. Steel can be repaired at any shop, bent back into place. It's +durable and will last a lifetime if you care for it properly. It does rust, so +be sure to lubricate your frame if it gets all wet. + +When selecting a frame, I recommend the following general priorities: + +* frame size (make sure it fits you!) +* cost +* material (steel preference) +* room for 28' wheels (for road biking) +* room for 45c tires (if you want to winter bike) + +Recommendations: + +* Garage sale +* Kilo TT +* Allcity + +-- Gear Ratio + +Chainring = large gear that you pedal +Sprocket = small gear on your wheel + +You will see the abbreviation Nt where N is a number like ~38 or ~50, and it +represents the number of teeth on the chrainring of your crankset. + +47t = 47 teeth on the chainring +16t = 16 teeth on the sprocket + +You will also see a ratio, which represents the chainring size (in teeth) +versus the sprocket size (in teeth). There are many combinations. + +48/17 = gear ratio + +Very very generally speaking, you'll want a larger gear ratio if you're riding +long flat distances (i.e. commuting). You will want a smaller ratio if you're +doing lots of stopping or hill climbing. Here are some more harmful +generalisations: + +52/17 = long, flat distances with no stopping +48/17 = medium flat distances with some stopping +46/17 = flat distances with some hills and some stopping +44/17 = lots of stop & go (traffic biking) / hills + +I will mention here that it is very critical to line up the two gears that will +be on your bicycle - they should be in as straight a line as possible. + +-- Crank Set + chain ring + +(at most $100) + +The actual crankset you select is very likely to be unnoticed to you, +especially if you're a newer biker. + +Recommendations: + +* The one that came on your garagesale bike + a new chainring +* Sugino RD2 +* Sram Omnium +* S3000 +* Andels + +-- Pedals + +(at most $40) + +Preferences, preferences. There are a lot of choices in this realm, but they +can be condensed into 3 major categories. + +pedal/cage: a steel trap for your shoe +pedal/strap: a fabric trap for your shoe +clipless: requires special shoes + +I like pedal/strap because I care about my shoes, and pedal/cage is very hard +on them. I also find the whole clipless system to be too complicated and +expensive for what I'm after (I don't want to buy a special pair of shoes to +ride my bicycle). + +Recommendations: + +clipless: Shimano m520 +pedal/cage: MKS GR9 +pedal/strap: Fyxation gates + a strap + +-- Chain + +(at most $30) + +3/32 is the most common chain size, so use that if possible. Otherwise, +whatever your crankset + sprocket supports. + +-- Wheels + +(at most $200) + +700c is the standard wheel size for road bikes, I recommend sticking to it. +Most frames will accept it. + +Aero wheels are nonsense unless you want to look cool or go very, very fast - +in which case riding a single speed doesn't make much sense. + +Imho you're best served buying a nice 700c "basic bitch" set of wheels that are +light and proven, or just using the ones already on your beater. + +Recommendations: + +* Wabi +* Weinmann DP18 +* H + Plus Son TB14 +* Miche Pistard + +-- Saddle + +(at most $30) + +Nobody but you can decide which saddle is comfortable. If you really want to +buy something on the internet and cannot wait, do not spend more than $30. + +Recommendations: + +* go to a bike shop and try some out +* use the one on your beater +* Wabi + +-- Handlebars + +(at most $50) + +Handlebars are another personal matter. There are a few popular types: + +* bullhorns: for the cowboy +* drops: for the speed demon +* risers: for low-riders + +Recommendations: + +* go to a bike shop and try some out! +* use the ones from your garbage bike + +-- Brakes + +If you're riding fixed gear, you only need a front brake since the pedals can +be activated to break your rear wheel. + +## How did we do? + +Let's assume we capped out on all of our budgets. That would be: + +* $200 frame +* $100 crankset +* $40 pedals +* $30 chain +* $200 wheels +* $30 saddle +* $50 handlebars + +total max: $650 + +Compare that to paying $469 for a brand new Kilo Stripper TT, which comes with +such low quality tires that the community consistently recommends upgrading +them. I'd wager that even at our maximum price point, our bike is a better +value. + +And of course, that's our hypothetical maximum - you could easily pay next to +nothing for a reliable (but maybe not flashy) road-ready fixie. + +## What's next doe? + +I'm going to be building my first fixed gear bicycle from stock purchased +components - my budget is $500. After it's put together, I'll add another blog +entry, and maybe a video of myself putting it together. + +After that, I want to build the cheapest possible single speed bicycle that I +can. Stay tuned. + +## Wild Ideas + +pcpartpicker, but for fixed gear bicycles. + +guide to build a fixed-gear bicycle for less than $100.
A
idea/dynamic-blog.html
@@ -0,0 +1,3 @@
+i made a dynamic blog! its most important attribute is that +it is not statically generated. because honestly most things +in my life are static and i need something a little dynamic.
A
idea/email-is-good-actually.html
@@ -0,0 +1,32 @@
+Email is like a lot like a long term partnership gone wrong. + +It was once young and spry, and felt good and effortless. The good times +flowed. Your grandma forwards you a piece of chainmail, and you reply-all +to the list of nephews and uncles. The tech adepts of the family had +@gmail addresses, while the older folks had @aol or @yahoo. Many +laughs. Heh. + +But something changed without our realizing it. Over time our relationship +with email became something of a chore. Like taking out the trash. The quirks +that enthralled you became something of a bother. Why did I ever like this +in the first place? Communication grew thin as you moved on from each other +with different goals. Something beautiful turned into something strained. + +Ahem. Well. Not that I would know anything about that. + +Like a partnership, we forgot why we loved email along the way. We've been +looking at it for so long that it's hard to tell why we fell in love in the +first place. + +But the charm is still there, we just have trouble seeing it. + +I want to describe how I view email as a communication tool: + +- decentralized +- federated +- transparent +- reliable +- well understood +- old, and poorly designed + +It has warts, but it works well.
A
idea/fail2ban-sux.html
@@ -0,0 +1,249 @@
+Date: 2020/03/22 + +-> fail2ban sucks + +i've made this argument countless times on the internet, +so i figure i'd write it down so that i can just link to +it instead. + +this tends to be a controversial opinion, i think. + + +critical note: +i am not saying that fail2ban sucks for every use-case, i +am mostly writing this in such a way to try and +counteract the fervant fail2ban recommendations that i +see everywhere, which i think are dangerous. if you like +fail2ban, fine, use it - but these are my thoughts. + +for those unfamiliar with fail2ban, generally speaking, +it is a piece of software that monitors log files for +login failures, and then interacts with your firewall to +block the IP addresses belonging to those failures. It is +configurable such that one can say "if an IP fails to +login via SSH 10 times in a row, block it for 1 hour." + +i see fail2ban commonly recommended on the internet. +typically when someone new to server administration sets +up a server and asks about all of these weird SSH +attempts, that's when fail2ban comes up. + + + + +here are some quotes from fail2ban fans: + +> One handy service is fail2ban, which will automatically +> IP addresses to the firewall if enough failed attempts +> are tried + +> To ban those, you could try to use fail2ban. Seems to be a common approach to +> this kind of bot activity. + +> In this case, a good password with iptables rate limiting, fail2ban & log +> monitoring is better. + +> Non-standard port and/or fail2ban for logspam if you're having fun. + +> I find the best/laziest combo is ufw/ssh/fail2ban/f2b-loop/logwatch. + + + + +i have a few arguments, this is the summary: + +do not change your standard ports. do not use fail2ban. + +do harden your applications with their built-in mechanisms. + +if you need super extra security for certain apps, +only allow trusted IP ranges - use an IP whitelist. + +most everyone else is overengineering. + + + + +fail2ban sucks, let me count the ways. + +fail2ban: + +* will not stop an advanced persistent threat +* will inconvinience you at some point +* may inconvinience *your users* at some point +* opens you up to fail2ban vulnerabilities +* may make you feel like your system is more secure than it is +* is no more secure than a properly configured + application +* is actually _less_ secure than a properly configured + application + +at best, fail2ban: does nothing +at worst, fail2ban: causes you massive inconvinience or total lockout + + + + + +let's put ourselves in the mindset of a new system +administrator. they spun up a new capsul[1], they're peeking +around their new system. suddenly they notice their SSH +logs - hundreds of ip addresses from russia and china +attempting to log into their systems over and over. + +naturally, this triggers what one might call "bad vibes." +it makes the system feel less clean. who decided that +this was okay? i just finished setting this system up +and it's already under attack!? + +do not listen to their advice, new admin. simply setup +SSH properly, and don't worry about a thing. here is my +rationale. first, let's think about who exactly those IPs +belong to. + +* bots + +there are tens of thousands of bots trying common +username/password combination against every service known +on earth - SSH isn't special. This goes for every login +page on the internet that expects a username and a +password. Think email and neocities. Think wordpress +admin pages and databases interfaces left wide open. + +if you do not leave your services listening on public +interfaces while they're configured with usernames like +"admin" and passwords like "admin", you have nothing to +worry about. + +* curious users + +friends looking to prank you, kids with no idea what SSH +even is, maybe that one girl at the bar you pissed off who +has Kali installed on her laptop. + +pro tip: these attempts will likely be less successful +than the bots. + +* advanced persistent threads + +usually state actors, maybe a botnet operator with a +grudge. in either case, fail2ban does nothing - these +users can scream through proxies like they're seeing the +matrix. they can change their IP address nineteen million +times a second without blinking. you can ban a quarter of +the IP addresses on earth with fail2ban - the attacker +will use another quarter. + +what i'm saying is, if you're fucked, you're fucked. +fail2ban will not help. but if you're secure, you're +secure, fail2ban will not help. see what i'm getting at? + + + + +OpenSSH + +i'll speak about OpenSSH specifically, but only because +it's brought up so often. here are the hardening +guidelines that you should abide by. + +* generate a password protected private/public keypair +* use key-based authentication to your system(s) +* turn off username/password auth + +you will still see the failed login messages. ignore +them. unless someone hacks your key _and_ the decryption +password, they **are not getting in via SSH**. + +it would take roughly 2,000 years using the dedicated +compute power of every computer on earth put together to +bruteforce that key. don't sweat it. they are not getting +in. + + + +fail2ban is good for freeing up resources though, right? + +wrong. fail2ban has to fuck with a live firewall. it'll +probably block you out. every second of your time is +worth more than a hundred hours of your compute operating +properly. setting up fail2ban takes time, and so does +getting yourself unblocked from it. + +the resources consumed by 10 SSH login attempts per +minute is staggeringly low. + +* if someone is trying to DDOS you, sorry, _you are going + to get DDOS'd_, fail2ban will not help. + + + + +but j3s i have a very valid super-dooper good reason for +changing the default OpenSSH port of 22 to some other +port + +well, okay fine. go ahead. but please take the following +into account: + +* changing your SSH port to non-root port (>1024) + means that if the SSH daemon dies, any userland process + can take its' place. this is bad. + +* changing your SSH port means that you'll have to do a + bunch of fuckery to get basic functionality working. + you will very likely waste hours of your life. you will + have to google "rsync ssh non standard port" every time + you want to use rsync. you will have to remember scp + flags. this is also bad. probably worse. + +* you will have to tell the port to anyone else who tries + legitimately accessing your system. + +in my mind, the only valid use-case for switching your +default SSH port is that flipping it to listen on port 80 +or 443 will get around most workplace firewalls. + + + +well okay fine, OpenSSH is a special case though, right? + +any application that is used to being bruteforced will +likely have protections implemented that you can use +against such bruteforcing. for an interesting read, +check out spamd: https://man.openbsd.org/spamd + +> When a sending host talks to spamd, the reply will be +> stuttered. That is, the response will be sent back a +> character at a time, slowly. For blacklisted hosts, the +> entire dialogue is stuttered. For greylisted hosts, the +> default is to stutter for the first 10 seconds of +> dialogue only. + +hilarious. + + + + +are you okay? + +not really + + + + +aka, my recommendations: + +* understand the security mechanisms built-in to your + application/daemon + +* use those mechanisms + +* get on with your life + + +misc + +[1]: https://capsul.org +fail2ban CVEs: https://www.cvedetails.com/vendor/5567/Fail2ban.html +SSH hardening: https://linux-audit.com/audit-and-harden-your-ssh-configuration/
A
idea/fixed-gear-update.html
@@ -0,0 +1,2 @@
+still in the shop, i need to order another little $6 part that the frame people +mistakenly didn't send me. woops. taking much longer than anticipated. will order parts now...
A
idea/git-necronomicon.html
@@ -0,0 +1,621 @@
+<h1># j3s’s git notes / guide / necronomicon</h1> +<p><em>for somewhat experienced computer-ers who want to git good</em></p> +<p>git is a complicated system, but i hope to give you an understanding that is sensible. this guide is mainly for people who have a grasp on the command line and some fuzzy git concepts in their head, and want to turn that knowledge into a functional understanding.</p> +<p>i don’t care about fully understanding git from head to toe, i am more concerned with the practical usage and application of the system than anything. most guides teach you about how git uses SHA1SUMs under the hood and blah blah blah. i don’t really care, i just want to show you how i use the system and go over some very common road bumps. you can read a 200 page thesis on the inner workings if you want - but i mostly don’t care.</p> +<p>i will teach you only what you must know to use git alone, and then with other people.</p> +<h1 id="git-is-a-distributed-version-control-system">git is a distributed version control system</h1> +<p>git is a distributed version control system. the word distributed here really just means that when you clone a git repository, your local copy is exactly as complete as the repo you cloned it from - the full # of commits, all the refs, every little freckle and scar is there.</p> +<p>when people say the word git, they generally mean one of three things:</p> +<ul> +<li>a git repository</li> +<li>the git command line tool</li> +<li>github (because it’s so popular people see this as “git” sometimes)</li> +</ul> +<h1 id="j3ss-recommended-barebones-git-config">j3s’s recommended barebones git config</h1> +<p>you can configure git via a file: $HOME/.git/config or $HOME/.config/git/config</p> +<p>these are normally preferences, but I highly recommend the following bare-bones config before you even start using git, to fix some questionable defaults:</p> +<pre><code>[user] +name = Your Name +email = you@example.org + +# to find your SMTP settings, duckduckgo for "email-provider-name SMTP" (for example "gmail SMTP") +[sendemail] +smtpserver = mail.example.org +smtpuser = you@example.org +smtpencryption = tls +smtpserverport = 587 + +[advice] +detachedhead = false + +[merge] +ff = only</code></pre> +<h1 id="foundational-knowledge-repositories-refs-and-commits-oh-my">Foundational Knowledge: repositories, refs, and commits, oh my!</h1> +<p>there are many fundamental concepts in git, and they’re often very confusing because they’re not intuitively named. please read these definitions carefully.</p> +<h2 id="repositories">repositories</h2> +<p>a git repository is just a pile of commits, and some refs.</p> +<h2 id="most-git-work-is-local-work">most git work is local work</h2> +<p>no command used in this document besides <code>git push</code> or <code>git fetch</code> affects anything other than our local git repositories - the ones on our own filesystem.</p> +<h2 id="commits">commits</h2> +<p>a commit is a simple record of who made the changes, and what & when the changes were made</p> +<p>each git commit gets a unique ID - it looks like this: <code>3c622a6860bfb21cffcd3bb51066c7b780206ca3</code></p> +<p>or, some people use the first 7 or 8 characters of the commit ID as a shorthand: <code>3c622a6</code></p> +<p>example of making a git commit while inside a git repository:</p> +<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="co"># first, we will make a commit:</span></span> +<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> echo <span class="st">"hello world!"</span> <span class="op">></span> file</span> +<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> git add file</span> +<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> git commit <span class="at">-m</span> <span class="st">'add file'</span></span> +<span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a><span class="ex">[master</span> <span class="er">(</span><span class="ex">root-commit</span><span class="kw">)</span> <span class="ex">94686b3]</span> add file</span> +<span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a> <span class="ex">1</span> file changed, 1 insertion<span class="er">(</span><span class="ex">+</span><span class="kw">)</span></span> +<span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a> <span class="ex">create</span> mode 100644 file</span></code></pre></div> +<p>example of viewing a full git commit:</p> +<div class="sourceCode" id="cb3"><pre class="sourceCode diff"><code class="sourceCode diff"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a>$ git log -p -2</span> +<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a>commit 94686b38ed654c2a809a68e4e207cc1819c5764d (HEAD -> master)</span> +<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a>Author: j3s <j3s@c3f.net></span> +<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a>Date: Mon Jan 4 13:02:09 2021 -0600</span> +<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a> add file</span> +<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a></span> +<span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a><span class="kw">diff --git a/file b/file</span></span> +<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a>new file mode 100644</span> +<span id="cb3-10"><a href="#cb3-10" aria-hidden="true" tabindex="-1"></a>index 0000000..a042389</span> +<span id="cb3-11"><a href="#cb3-11" aria-hidden="true" tabindex="-1"></a><span class="dt">--- /dev/null</span></span> +<span id="cb3-12"><a href="#cb3-12" aria-hidden="true" tabindex="-1"></a><span class="dt">+++ b/file</span></span> +<span id="cb3-13"><a href="#cb3-13" aria-hidden="true" tabindex="-1"></a><span class="dt">@@ -0,0 +1 @@</span></span> +<span id="cb3-14"><a href="#cb3-14" aria-hidden="true" tabindex="-1"></a><span class="va">+hello world!</span></span></code></pre></div> +<p>that’s it, the entire concept of a commit. you can see the who (made the commit), what (was committed), when (was it committed), and why (it was committed).</p> +<p>if the “what” portion (changes made, aka diff) seem a little cryptic at first, don’t worry, it is. know that there are much nicer ways to view git diffs.</p> +<h3 id="commit-ids">commit ids</h3> +<p>you might refer to this commit as <code>94686b38ed654c2a809a68e4e207cc1819c5764d</code> or <code>94686b38</code> for short.</p> +<h3 id="git-checkout">git checkout</h3> +<p>the <code>git checkout</code> command simply moves you between commits. you can either reference short commit ids, long commit ids, or refs (which you’ll learn about now-ish).</p> +<h3 id="qa">Q&A</h3> +<blockquote> +<p>wtf was <code>git add</code> about?</p> +</blockquote> +<p>in order to commit changes, git wants to know which ones to commit. this is so you may break your changes up into little pieces, if you’d like. for example, if you have changed ten files, you may only want to commit files 1 and 3. you may use <code>git add</code> to “stage” only those changes, followed by <code>git commit -m "commit message"</code> to commit them.</p> +<blockquote> +<p>i’m lost</p> +</blockquote> +<p>use <code>git status</code> in a repo at any time to get an overview of where you’re at.</p> +<p>ask me questions - j3s@c3f.net (email) or <span class="citation" data-cites="j3s:cyberia.club">@j3s:cyberia.club</span> (matrix)</p> +<blockquote> +<p>how are these commit records ordered?</p> +</blockquote> +<p>this is quite simple. every commit references only the commit it was placed on top of. you can follow this chain all the way back to commit #1 - it’s a sequential line.</p> +<h2 id="refs">refs</h2> +<p>referring to a commit by ID really sucks. so refs are a thing.</p> +<p>you can think of a ref like a CNAME in DNS, or a symbolic link (ln -s) basically, just a human friendly name for a thing.</p> +<p>refs simply point to commit IDs. easy peasy.</p> +<p><code>i-love-this-commit -> 94686b38</code></p> +<p><code>development-test-1 -> 94686b38ed654c2a809a68e4e207cc1819c5764d</code></p> +<p>there are two super important types of refs - <em>branches and tags</em>.</p> +<h3 id="branches">branches</h3> +<p>branches always point to exactly 1 commit.</p> +<p><em>however</em> when commits are made <em>while you are on a branch</em>, the branch updates the commit it is referencing to the commit you have just made.</p> +<p>for example:</p> +<pre><code># see the commit ID that our current branch is referencing +$ git show-branch --sha1-name +[94686b3] add file + +# make a new commit + +$ echo 'hello world, again??' > file2 +$ git add file2 +$ git commit -m 'add file2' + + +# see that the commit our branch is referencing has changed auto-magically +$ git show-branch --sha1-name +[9e379d4] add file2</code></pre> +<h4 id="qa-1">Q&A</h4> +<blockquote> +<p>what is this git checkout thing?</p> +</blockquote> +<p>you may use <code>git checkout</code> to move between commits. you can target either a commit ID or a ref.</p> +<p>for example, these are all valid:</p> +<p> <code>git checkout my-branch</code> +<code>git checkout some-tag</code> +<code>git checkout 94686b38</code> +</p> +<p><em>remember, that if you check out a commit ID or a tag, any commits you make from there will fallinto the aether. you almost always want to be checking out branches.</em></p> +<blockquote> +<p>if i run <code>git init</code>, what is the default branch name?</p> +</blockquote> +<p><code>master</code>. there is nothing special about branches named master, it just happens to be the default. most people use this branch as the “source of truth”, but varies a shit ton and i wouldn’t rely on that to be true.</p> +<blockquote> +<p>what if i don’t commit to a branch?</p> +</blockquote> +<p>if you do not commit while you have a branch checked out, your commit will still be valid - it’ll fall into the pile of commits per usual.</p> +<p><em>however</em>, if you do not eventually reference this commit (via either a branch or a tag) it will be automatically garbage collected and removed from your repository.</p> +<p>git intends for you to use branches while developing.</p> +<blockquote> +<p>what is this HEAD thing?</p> +</blockquote> +<p>HEAD is just a ref to the currently checkout commit. normally, that’s the latest commit on a branch. sometimes it’s a particular commit that you’ve checked out for whatever reason. If it helps, you can think of it the same way you'd think of "." in the terminal.</p> +<blockquote> +<p>wtf is a “detached HEAD”</p> +</blockquote> +<p>an unfortunate name, tbh. a detached head just means you’ve checked out a commit that is not the tip of a branch. that’s it.</p> +<p>the only thing you’re “detached” from is the latest commit of branches. so your current HEAD is detached from the branch. get it?</p> +<h2 id="tags">tags</h2> +<p>tags are refs that are almost exclusively used to point to commits that are known to be stable, and are used for versioning purposes.</p> +<p><em>critically, tags never update or change in any way after they’re created.</em></p> +<p>there are several types of tags - everyone uses <em>annotated tags</em>. almost everyone refers to “annotated tags” as “tags.” you’re unlikely to need to use or learn about other types of tags.</p> +<p>annotated tags have a special property: they can store a message, just like commits can. this can be used to include changelog info, or signoff info, or to draw ascii art.</p> +<p>to make an annotated tag:</p> +<pre><code># hey! i have a commit i really like. +# it's called `9e379d4`. + +# first, checkout the commit you like so much: +$ git checkout 9e379d4 +HEAD is now at 9e379d4 add file2 + +# now, make an annotated tag (the only kind of tag anyone cares about): +$ git tag -a i-really-like-this-particular-commit -m "yeah it's lit" + +# you can now checkout your new funky tag +$ git checkout i-really-like-this-particular-commit + +# note that you will be in the "detached head" state after +# checking out your tag. this isn't bad, but git would make +# you believe it is.</code></pre> +<p>⚠️WARNING⚠️</p> +<p>remember, when you check out a tag, any commits that you make will just fall into the commit abyss, and be deleted unless you reference them!</p> +<h2 id="foundational-knowledge-complete">Foundational knowledge complete</h2> +<p>congrats! you know a lot about git now. take a break pls, relax your shoulders & jaw and grab a cofvefe. then go to sleep. let this stuff sink in, and dream gently of how branches and tags are just refs. and how commits all pile up into a daemonic abyss…</p> +<p>…</p> +<h2 id="tldr">tl;dr</h2> +<p>concepts:</p> +<ul> +<li>a git repo is a pile of commits and some refs</li> +<li>commits contain the who, what, when, and why of changes made to the files. they also have annoying IDs.</li> +<li>refs are just human friendly pointers to commit IDs</li> +<li>branches are a type of ref that auto-updates when you commit to it</li> +<li>tags are a type of ref that have messages, and never change. they are mostly used for versioning.</li> +</ul> +<p>tools:</p> +<ul> +<li><code>git checkout <tag/branch/commitID></code> moves around between commits</li> +<li><code>git status</code> shows the current branch and any changed files and other misc helpful info</li> +<li><code>git add <filename></code> will stage changes</li> +<li><code>git commit -m "message"</code> will commit changes</li> +</ul> +<h1 id="working-with-others">working with others</h1> +<p>And now, for more annoying things: working with people. or: pushing, fetching, cloning, remotes, and merging</p> +<p>If you use git to maintain some personal projects on one machine, stop reading - you’re done!</p> +<p>But if you care to put your work on a server for people to utilize (including yourself), or you want to help work on someone elses project, I recommend reading on.</p> +<h2 id="remote-confusion">remote confusion</h2> +<p>there are three absolute sources of confusion with working with remote repositories, and i want to address them up front.</p> +<p><em>ONE: git is almost completely local</em></p> +<p>people often think that git commands will interact with servers, in reality this is very rare.</p> +<p>no git commands in this guide interact with servers except <code>git push</code> and <code>git fetch</code>.</p> +<p>almost all git commands are local.</p> +<p><em>TWO: remote repositories are tangled with your local repositories.</em></p> +<p>remote repositories are not tangled with your local repository. even if you git clone a remote repository, the local clone is entirely independent.</p> +<p><em>the short name for “remote repositories” is “remotes”</em></p> +<p>remember that repositories include all refs and commits, so fetching a remote means you get all of its refs and commits as well. many people think that “remotes” refers to branches or servers - not so! remotes are simply repositories that are somewhere that isn’t your current repository.</p> +<h2 id="remotes-and-fetching-and-pushing">remotes and fetching and pushing</h2> +<p>remotes are, quite simply, git repositories that are somewhere else.</p> +<p>you must access remote branches somehow - the typical methods are via HTTPS, FTP, local filesystem, or SSH. therefore, remote URLs will look something like this:</p> +<pre><code>https://git.sequentialread.com/forest/threshold.git +git@giit.cyberia.club:~vvesley/terminal_shit # this is ssh in disguise +ssh://git@giit.cyberia.club/~starless/fate-discord-bot # this is the full ssh URL +/home/j3s/code/shitchat</code></pre> +<p><em>note that HTTPS and FTP URLs are almost always read-only.</em> <em>if you want to push, use the SSH URL</em></p> +<h3 id="adding-remotes">adding remotes</h3> +<p>we can add a remote to our test repository like so:</p> +<pre><code>$ git status +On branch master +nothing to commit, working tree clean + +$ git remote add terminalshit https://giit.cyberia.club/~vvesley/terminal_shit + +$ git remote -v +terminalshit https://giit.cyberia.club/~vvesley/terminal_shit (fetch) +terminalshit https://giit.cyberia.club/~vvesley/terminal_shit (push) + +$ git fetch terminalshit +warning: no common commits +remote: Enumerating objects: 19, done. +remote: Total 19 (delta 0), reused 0 (delta 0), pack-reused 19 +Unpacking objects: 100% (19/19), 14.73 KiB | 457.00 KiB/s, done. +From https://giit.cyberia.club/~vvesley/terminal_shit + * [new branch] master -> terminalshit/master</code></pre> +<p>as you can see, there’s nothing very special about remotes at all. they’re very dumb. you just add them and fetch them. fetching just gets the latest version of one of your remotes.</p> +<p>once remotes are fetched, you can use them locally, not so remote after all!</p> +<pre><code>$ ls +file file2 + +$ git branch --all +* master + remotes/terminalshit/master + +$ git checkout remotes/terminalshit/master +HEAD is now at 8e21382 + +# HELPFUL j3s TIP! you can just type "git checkout terminalshit/master" here, +# remotes/ is implied + +$ ls +LICENSE.md README.md main.go</code></pre> +<p>in practice, you would probably never add the remote URL of an unrelated repository. but i wanted to illustrate a point - that remotes are in no way tied to your own local branches. they are completely, 100% independent.</p> +<p>let’s undo that and add a remote that actually makes sense.</p> +<h3 id="changing-remotes">changing remotes</h3> +<p>say you’ve added a wrong remote and want to change the URL.</p> +<p>One way is to simply remove the bad remote and add a good one:</p> +<pre><code>$ git checkout master +Switched to branch 'master' + +$ git remote rm terminalshit + +$ git remote add origin git@giit.cyberia.club:~j3s/git-example # i add an SSH URL because I want to write to this repo. + +$ git branch -a +* master + remotes/origin/master + +$ git remote -v +origin git@giit.cyberia.club:~j3s/git-example (fetch) +origin git@giit.cyberia.club:~j3s/git-example (push)</code></pre> +<p>i used the Cyberia Forge to make a blank remote git repository, and got the URL from its’ interface.</p> +<p>since we have write access, we can easily push our changes to the remote:</p> +<pre><code># for reasons that we may never know, +# the syntax of this command is `git push <remote-name> <branch-name>` + +$ git push origin master + +Enumerating objects: 6, done. +Counting objects: 100% (6/6), done. +Delta compression using up to 8 threads +Compressing objects: 100% (3/3), done. +Writing objects: 100% (6/6), 443 bytes | 443.00 KiB/s, done. +Total 6 (delta 0), reused 5 (delta 0), pack-reused 0 +To giit.cyberia.club:~j3s/git-example + * [new branch] master -> master</code></pre> +<p>woo! we’ve stored our changes remotely. we can now do infinite stage, commit, push loops forever and ever… unless???</p> +<h2 id="merging">merging</h2> +<p>merging is simple in theory. basically, git takes two branches and attempts to make them one branch by identifying their common history and zipping them together - kind of like if you were to mash two trolli crawler worm snacks together.</p> +<p>merging is best explained by doing. please follow along with this example and get a feel for switching between branches and merging them into each other.</p> +<p>we’ll use the <code>git merge</code> tool - the syntax is <code>git merge <branch></code>.</p> +<p>it will merge whatever branch you target into your current branch.</p> +<p>of course, you may target remote branches.</p> +<pre><code># first, we will make a git repository, put a file in it, and make our first +# commit +$ cd /tmp +$ git init merge-test +Initialized empty Git repository in /tmp/merge-test/.git/ +$ cd merge-test +$ echo blah > file1 +$ git add file1 +$ git commit -m 'add file1' +[master (root-commit) ab1b602] add file1 + 1 file changed, 1 insertion(+) + create mode 100644 file1 + +# next, we will flip to a different branch and make a commit over there +$ git checkout -b different-branch +Switched to a new branch 'different-branch' +$ echo blahblah > file2 +$ git add file2 +$ git commit -m 'add file2' +[different-branch d8b4a32] add file2 + 1 file changed, 1 insertion(+) + create mode 100644 file2 + +# finally, we switch back to our master branch and check out our log - +# you can see that file2 is missing. we merge different-branch into +# our master branch with "git merge different-branch". +$ git checkout master +Switched to branch 'master' +$ git log +commit ab1b6025ea49c40e5ef4acf68272d0dd9e4de963 (HEAD -> master) +Author: j3s <j3s@c3f.net> +Date: Tue Jan 5 16:54:55 2021 -0600 + + add file1 +$ git merge different-branch +Merge made by the 'recursive' strategy. + file2 | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 file2 +$ git log +commit 90c66a1a6fe29073042c1fd2b391640e2b81f4ca (HEAD -> master) +Merge: ab1b602 d8b4a32 +Author: j3s <j3s@c3f.net> +Date: Tue Jan 5 16:55:37 2021 -0600 + + Merge branch 'different-branch' + +commit d8b4a323726f2dde3e8edfe6cf9d09bc90c6c19f (different-branch) +Author: j3s <j3s@c3f.net> +Date: Tue Jan 5 16:55:23 2021 -0600 + + add file2 + +commit ab1b6025ea49c40e5ef4acf68272d0dd9e4de963 +Author: j3s <j3s@c3f.net> +Date: Tue Jan 5 16:54:55 2021 -0600 + + add file1</code></pre> +<p>You will note that merging branches causes an extra commit to be generating detailing the merge - that is good! it’s mostly clerical.</p> +<p>eventually, possibly even already, you’ll run into the dreaded…</p> +<h3 id="a-word-of-mergey-warning-or-why-ff-is-good">A WORD OF MERGEY WARNING, OR: WHY FF is GOOD</h3> +<p>ok, let me stop for a sec and address something quick.</p> +<p>git merge doesn’t always require a nice commit message. sometimes, it can detect a very particular situation.</p> +<p>let’s say that you have cloned a remote repository, like shitchat.</p> +<p>let’s say you did this in the year 1974.</p> +<pre><code>$ date +Tue 05 Jan 1974 05:07:25 PM CST +$ git clone https://giit.cyberia.club/~j3s/shitchat</code></pre> +<p>and now it’s the year of our lord, $CURRENT_YEAR, and you want to pull in all of the latest shitchat updates! well, you git fetch from your remote of course!</p> +<pre><code>$ date +Tue 05 Jan 2077 + +$ git fetch origin +remote: Enumerating objects: 514, done. +remote: Counting objects: 100% (444/444), done. +remote: Compressing objects: 100% (358/358), done. +remote: Total 385 (delta 205), reused 1 (delta 0) +Receiving objects: 100% (385/385), 104.62 KiB | 3.87 MiB/s, done. +Resolving deltas: 100% (205/205), completed with 17 local objects. +From https://giit.cyberia.club/~j3s/shitchat + 61ae285..757305d master -> origin/master + +$ git merge origin/master +Updating c1466a6..3994c88 +Fast-forward + README.md | 3 +++ + 1 file changed, 3 insertions(+) + create mode 100644 README.md</code></pre> +<p>Wait, <code>Fast-forward</code>? why didn’t i get to type a commit message?</p> +<p>in this case, git noticed that the branches you’re merging have common ancestry - and that one of them (your local copy) can simply be sped up, so that it’s up to date with the remote! no merge necessary, since they weren’t merged at all - they’re two identical (but separate) repos!</p> +<p>if you own two copies of <code>harry potter: the wizard</code> and one is half complete, you wouldn’t tear the ending out of the good copy out to fix the incomplete copy, you’d just finish the incomplete one with a pen. that’s basically how fast-forwards work. no commit message necessary.</p> +<h3 id="buzzfeed-article-is-git-pull-problematic">BUZZFEED ARTICLE: IS GIT PULL PROBLEMATIC???</h3> +<p>git pull has a troubled past.</p> +<p>people will tell you to use <code>git pull</code> - don’t listen to those people unless you know this wisdom:</p> +<ul> +<li>git pull is just “git fetch <remote>” followed by “git merge <remote>”</li> +</ul> +<p>I highly recommend using this methodology first. fetch and merge.</p> +<ul> +<li>git pull can create all sorts of hell with your commit history, and it will confuse the shit out of you</li> +</ul> +<p>see https://stackoverflow.com/questions/15316601/in-what-cases-could-git-pull-be-harmful</p> +<p>by default, git pull can have many dreaded consequences - the worst of all is leaving inconsistent nonlinear commits fucking everywhere.</p> +<p>i recommend using fetch followed by merge to get a grasp on the individual steps (since they can sometimes be confusing) - and then transtioning to <code>git pull</code> after a few weeks/months once you have dealt with various edge cases.</p> +<p>tl;dr: don’t use <code>git pull</code> if you’re new to git, or it’ll cost you a lot of time/work.</p> +<p>tldr;tl;dr: use git fetch && git merge, forget git pull.</p> +<h3 id="merge-conflicts">MERGE CONFLICTS</h3> +<p>welp, things were going fine. git seemed easy and intuitive. but then… well…</p> +<p>when git tries to merge and cannot automatically do it, it requires human intervention. this is called a “merge conflict”. let us demystify.</p> +<p>like merging, merge conflicts are easier to demonstrate than describe.</p> +<p>First, we’ll initialize 2 repositories with identical histories.</p> +<pre><code>$ git init repo1 +Initialized empty Git repository in /tmp/repo1/.git/ +$ cd repo1 +$ echo 'blahblahblah' > file1 +$ git add file1 +$ git commit -m 'add file1' +[master (root-commit) 74a9348] add file1 + 1 file changed, 1 insertion(+) + create mode 100644 file1 +$ cd .. +$ cp -a repo1 repo2</code></pre> +<p>Now, we’ll make their <code>master</code> branches have different commits.</p> +<pre><code>$ cd repo2 +$ echo 'this is shitty code' >> file1 +$ git add file1 +$ git commit -m 'i have consumed too much alcohol and produced suboptimal *hic* code' +[master 3211e8d] i have consumed too much alcohol and produced suboptimal *hic* code + 1 file changed, 1 insertion(+) +$ cd ../repo1 +$ echo 'shit is amazing code' >> file1 +$ git add file1 +$ git commit -m 'i have consumed stimulants and am soulless but produce good code' +[master 9099012] i have consumed stimulants and am soulless but produce good code + 1 file changed, 1 insertion(+)</code></pre> +<p>now, we will simply add repo2 as a remote for repo1! and we’ll try and merge their histories, which of course cannot work.</p> +<pre><code>$ git remote add repo2 ../repo2 +$ git fetch repo2 +remote: Enumerating objects: 5, done. +remote: Counting objects: 100% (5/5), done. +remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 +Unpacking objects: 100% (3/3), 271 bytes | 271.00 KiB/s, done. +From ../repo2 + * [new branch] master -> repo2/master +$ git merge repo2/master +Auto-merging file1 +CONFLICT (content): Merge conflict in file1 +Automatic merge failed; fix conflicts and then commit the result.</code></pre> +<p>NOW we’re in it. a weird state. HELP! what does <code>git status</code> say???</p> +<pre><code>$ git status +On branch master +You have unmerged paths. + (fix conflicts and run "git commit") + (use "git merge --abort" to abort the merge) + +Unmerged paths: + (use "git add <file>..." to mark resolution) + both modified: file1 + +no changes added to commit (use "git add" and/or "git commit -a")</code></pre> +<p>okay, fix conflicts. let’s pop open the file:</p> +<pre><code>$ cat file1 +blahblahblah +<<<<<<< HEAD +shit is amazing code +======= +this is shitty code +>>>>>>> repo2/master</code></pre> +<p>git inserted a bunch of shit.</p> +<p>basically, everything between <code><<<<<<< HEAD</code> and <code>=======</code> is your current branch. everything between <code>=======</code> and <code>>>>>>>> repo2/master</code> is <code>repo2/master</code> stuff.</p> +<p>your job is to pick the right stuff, remove the <<<< and >>>> and ==== parts, and then type <code>git add file1</code> and <code>git commit</code>. so, let’s do it.</p> +<pre><code>$ cat file1 +blahblahblah +shit is amazing code +$ git status +On branch master +You have unmerged paths. + (fix conflicts and run "git commit") + (use "git merge --abort" to abort the merge) + +Unmerged paths: + (use "git add <file>..." to mark resolution) + both modified: file1 + +no changes added to commit (use "git add" and/or "git commit -a") +$ git add file1 +$ git commit +[master 24d690d] Merge remote-tracking branch 'repo2/master'</code></pre> +<p>voila, merge conflict resolved. if this sort of thing ever gets horribly complicated (and god, it does) - use a good GUI, it helps IMMENSELY.</p> +<p>check out how cute our commit history looks after that though:</p> +<pre><code>* 24d690d - Merge remote-tracking branch 'repo2/master' (HEAD -> master) +|\ +| * 3211e8d - i have consumed too much alcohol and produced suboptimal *hic* code (repo2/master) +* | 9099012 - i have consumed stimulants +|/ +* 74a9348 - add file1</code></pre> +<p>hopefully, you’re able to reason about the above commit graph!</p> +<h2 id="cloning">cloning</h2> +<p>okay, fine, good. we’ve already cloned a whole bunch but let’s sorta cover it.</p> +<p>first order of business, clone a repo.</p> +<pre><code>git clone https://giit.cyberia.club/~j3s/git-example +Cloning into 'git-example'... +remote: Enumerating objects: 6, done. +remote: Counting objects: 100% (6/6), done. +remote: Compressing objects: 100% (3/3), done. +remote: Total 6 (delta 0), reused 0 (delta 0), pack-reused 0 +Unpacking objects: 100% (6/6), 423 bytes | 47.00 KiB/s, done.</code></pre> +<p>What happened here, exactly? well, it turns out that git clone does a shit ton of things.</p> +<p>git clone:</p> +<ul> +<li>makes a directory</li> +<li>makes a blank git repository in that directory</li> +<li>adds a remote repository called “origin” based on the URL you typed in</li> +<li>makes a local branch called “master”</li> +<li>fetches the remote repository</li> +<li>merges the default remote branch (master, most likely) into your local master branch, making them identical</li> +</ul> +<p>We can see the results:</p> +<pre><code>$ git branch -a +* master + remotes/origin/HEAD -> origin/master + remotes/origin/master</code></pre> +<p>you’ll note that the remote HEAD is pointing at the remote master branch. this is almost always goin to be the case, feel free to read the HEAD section again for why this makes sense.</p> +<h2 id="summary-2">summary 2</h2> +<p>ALRIGHT. we have covered a lot of confusing ground. let’s summarize.</p> +<ul> +<li>remotes can be added and fetched</li> +<li>remotes can use HTTPS, FTP, SSH, local FS, or any number of protocols</li> +<li>any branch can be merged into any other branch as long as they share some history</li> +<li>git pull is just fetch + merge</li> +<li>git push will push your commits to a remote repository</li> +<li>clone is a bunch of shit packed together for convinience</li> +<li>fast forwarding during merging is good and makes no commit messages</li> +<li>merge conflicts happen when git needs a human touch</li> +</ul> +<h1 id="workflow-examples">workflow examples</h1> +<h2 id="working-on-your-own-project-but-keeping-a-copy-of-the-repository-on-a-server-somewhere">working on your own project, but keeping a copy of the repository on a server somewhere</h2> +<p>you might choose this workflow so that you can clone your repo from any computer you work on!</p> +<ol type="1"> +<li>clone remote repository</li> +<li>change some files</li> +<li>stage and commit your changes (remember, commits can <em>only</em> happen locally)</li> +<li>push your changes</li> +</ol> +<h2 id="working-on-someone-elses-project">working on someone elses project</h2> +<p>you might choose this workflow because you have to!</p> +<ol type="1"> +<li>clone remote repository</li> +<li>change some files</li> +<li>stage and commit your changes</li> +<li>get your commits to them somehow (either via email patches, or pull requests)</li> +</ol> +<h2 id="a-typical-git-workflow-working-on-your-own-project">a typical git workflow, working on your own project</h2> +<ol type="1"> +<li>make a local repository</li> +<li>make an initial commit to this repository, adding all the files you want to track</li> +<li>add a remote to your repository</li> +<li>push to the remote</li> +</ol> +<h1 id="etc">etc</h1> +<p>this is other useful stuff to know, in no particular order</p> +<h2 id="git-diff">git diff</h2> +<p>I use <code>git diff</code> very often. i use <code>git diff --staged</code> just as often!</p> +<p><code>git diff</code> will simply show you any unstaged changes that you’ve made. combined with <code>git status</code> it’ll give you confidence before you type <code>git commit</code> and inevitably commit some fucked up stuff.</p> +<h2 id="help-i-misspeldt-some-shit-in-my-git-commit">help, i misspeldt some shit in my git commit</h2> +<p>if you haven’t pushed yet, <code>git commit --amend</code> can fix up a local commit.</p> +<p>if you have already pushed, live with it. embrace it. maybe Randomly capitalize things to keep people on their toes.</p> +<h2 id="pull-requests">pull requests</h2> +<p>basically, a pull request is the diff of your branch and someone elses branch.</p> +<p>but how do you get this diff to them??? why, register an account on github of course!</p> +<p><em>pull requests have nothing to do with git. they were invented by github</em> <em>in an effort to proprietarily extend git and make you reliant on their service.</em></p> +<p>but that could be a lot of changes ?? yeah, well, pull requests are kind of a weird way of git contribution. but they are industry standard, so there’s that.</p> +<p>you normally don’t have write access to repos you want to contribute to, so github/gitlab/gitea/etc will have you:</p> +<ol type="1"> +<li>make an account</li> +<li>“fork” (more jargon) someones repository</li> +<li>clone your fork</li> +<li>make changes locally</li> +<li>push those changes to your fork</li> +<li>make a pull request via the web GUI</li> +<li>the pull request will display the difference between your branch and theirs</li> +<li>maintainers can “merge” your branch in, if there are no merge conflicts</li> +</ol> +<p>that’s the basic process. it’s not too bad but tbh but doesn’t make a lot of sense to compare entire branches when you just want to get them a little commit... but the sea knows no sense and the ocean hears no reason.</p> +<p>github was good for free software awhile ago, and they’re still pretty cool i think.</p> +<p>even still, i try not to use github nowadays. github has an industry monopoly on git repositories, which were meant to be distributed. they also invented the concept of a “pull request” and really not much else.</p> +<h2 id="bare-repositories">bare repositories</h2> +<p>“normal” git repos are called “working repos”. weird git repos are called “bare repos”.</p> +<p>bare repos and working repos are both fine, but normally:</p> +<ul> +<li>a repo on a workstation is normally a working repo</li> +<li>a remote server-side repo is normally bare</li> +</ul> +<p>the reasons are pretty boring. read <a href="https://web.archive.org/web/20200410064607/https://www.saintsjd.com/2011/01/what-is-a-bare-git-repository/">this</a></p> +<h2 id="recursion-but-upwards-though">recursion, but upwards, though</h2> +<p>the git cli will search all parent directories for a .git directory. if it finds one, it will try and use it.</p> +<p>example:</p> +<pre><code>$ pwd +/tmp/garbage +$ git init +Initialized empty Git repository in /private/tmp/garbage/.git/ +$ mkdir some-directory +$ cd some-directory/ +$ git status +On branch master + +No commits yet + +nothing to commit (create/copy files and use "git add" to track)</code></pre> +<h2 id="gitignore">.gitignore</h2> +<p>you can make a <code>.gitignore</code> file in the root of your git repo. this file tells git what to not track. you can use globs. so a <code>.gitignore</code> file might look something like this:</p> +<pre><code>.DS_STORE +huge-compiled-binary +.editor-preferences +python-libs/*</code></pre> +<p>assuming you didn’t want to store the python libs in git. probably not.</p> +<h2 id="can-i-store-bigass-non-text-files-in-git">can i store bigass non text files in git?</h2> +<p>you can, you might, but you probably shouldn’t. if those binaries change, you definitely shouldn’t. but idk, store your family photo albums in git, it’ll be slow but who cares. i’m not ur boss.</p> +<h1 id="misc-stuff">Miscellaneous Stuff</h1> +<h2 id="i-have-horribly-fucked-up-this-git-repository-but-a-remote-repository-exists-in-a-good-state">I have horribly fucked up this git repository, but a remote repository exists in a good state</h2> +<pre><code>cd .. +rm -rf your-git-repo +git clone remote-git-repo</code></pre> +<h2 id="i-have-a-merge-conflict-and-have-no-idea-how-to-procede">I have a merge conflict and have no idea how to procede</h2> +<p>use git status to find troubleshooting details:</p> +<pre><code>git status</code></pre> +<h2 id="i-want-to-contribute-to-a-project-that-uses-a-mailing-list">I want to contribute to a project that uses a mailing list</h2> +<p>First, set up git-send email. Either use the config at the top of this document or use https://git-send-email.io/ to guide you.</p> +<p>Then;</p> +<pre><code>git clone https://giit.cyberia.club/~j3s/git-example +cd git-example +echo "CHANGES!" >> file1 +git add file1 +git commit -m 'change file1' +git send-email --to="mailing-list@example.org" HEAD^ # HEAD^ is a shortcut for "the latest 1 commit"</code></pre> +<h2 id="i-accidentally-pushed-a-secret-to-a-public-repo">i accidentally pushed a secret to a public repo</h2> +<p>public repos are scraped constantly, the best possible option is to rotate the credential <em>immediately</em> and leave the old credential in git.</p> +the second best option is to force overwrite history lololol but nobody does that, right?
A
idea/holy-is-thy-name.html
@@ -0,0 +1,31 @@
+HOLY IS THE NAME (OF MY RUTHLESS AXE) + +"All that pain. I thought to myself, I gotta fight, I'm +gonna die. This guy is going to play with me, play with +me, and then he is going to kill me. He already said he's +going to kill me, he already said he killed other girls, +I gotta fight. I jumped up real fast and I spit in his +face. And he said "you're death bitch, you're dead" and +he's wiping his eyes. And I laid down real quick and +grabbed my bag. And he was starting to come for me, when +I grabbed my bag, and whipped my pistol out toward him, +and he was coming towards me with his right arm I +believe, and I shot immediately and I think I shot twice, +as fast as I could." + +Holy is the name of the seeping gash +Holy is the name of my ruthless axe +Holy is the name of the endless night +Holy is the name of my gleaming scythe + +All my rapists lay beside me +All my rapists cold and grey + +Holy is the name of the seeping gash +Holy is the name of my ruthless axe + +All my rapists lay beside me +All my rapists still and grey + +All my rapists lay beside me +All my rapists still and grey
A
idea/pumpernickel-bread.html
@@ -0,0 +1,34 @@
+dry: + 400g rye flour + 200g whole wheat flour + 120g bulgur + 1 1/2 tsp salt + 1 tsp of fresh cocoa powder + +mix dry ingredients together + +wet: + 1 1/2 tbsp molasses + 1/2L warm water + +mix liquid and dry ingredients together + +add 1 1/2 tbps vegetable oil + +mix slowly. + +pack tightly into a thin bread cooker thing +put ceran wrap over it +turn on oven light for warmth and put it into an oven + +go to sleep + +take off ceran wrap, put on aluminum foil + +turn stove to 220F + +put tray of water under it for humidity + +leave alone for 6 - 6 1/2 hours + +take out, cut and serve!!
A
idea/something-is-different.html
@@ -0,0 +1,38 @@
+the smell of my bedroom +the way his hair curls +how my sheets in the morning +are cold + +i'm told getting old +is +a little bit dry and morbose, maybe gross +but not scary +if you're to believe them +it's gold. + +at least that's what i'm told. + +but sunrays look dimmer and +dark shadowly halls in my mind +seem ever easier to find +in the night of my chamber +as i pace on the floor + +it can't just be me, the sun sets +differently, +how the brightest of red used to rouse me +from bed, +but now all i feel is the familiar dread +of the cold on the floor +nothing more + +it can't just be i, how night swallows my sky +like a snake takes a rabbit head whole +in the pit of my mind is the skin of his face +his flesh taught like a taught trampoline at its base + +where's the day? + +it never used to be this way + +something is different
A
idea/storing-passwords-with-age.html
@@ -0,0 +1,171 @@
+my finally final password encryption method + + +MY QUEST FOR A PASSWORD STORE THAT WORKS FOR ME +=============================================== + +i have tried many times to use a tool that encrypts my +passwords, and nearly every time i give in to convinience. + +there are somewhere between ten and fifty passwords that i keep +memorized and can conjure at a moments notice, and it's very convenient +to do so. + +i have, in my 8+ year computing career, tried using +the following tools exclusively to secure my passwords: + +- keepass / keepassx / browser extensions - + +it became WAY too clunky to lug the keybase database around. sometimes +it would hit file conflicts, and it's a huge binary file so it's not simple +to store in version control. + +- pass - + +well, i had to learn PGP to use pass. the lack of iOS/desktop browser integration +was also problematic for me, as i spend an inordinate amounts of time entering +passwords on web browsers. + +- macos's keystore - + +it's proprietary and only supports Apple devices. not sure why i even tried this. + +- bitwarden - + +this one i went all-in on. unfortunately, it suffers from the same problem keepass +does - i must enter one huge cludgy password every time i want to get to any +of my other passwords. this, to me, sucks balls. + +- raw PGP - + +ah, my ignorant days of "minimalism". i went the whole 9 yards - bought a smartcard +reader and generated my PGP key on it. used it for SSH. all that. i don't recommend +this unless you want to straight up lose 1/5 of your available free time. + +- pash - + +ah, pass, my favorite option so far, but simpler! + +- pass again - + +ah, pash wasn't compatible with lots of stuff. hello again old friend. + + + +AND YET +======= + +pass serves me fine, but PGP is very concerning. not only because i'm +a floundering moron who didn't make a key backup, therefore making my +only smartcard a ticking time bomb, but because even if i had, i could +never in a million years move that key to my phone. because phones aren't +really made to support PGP. this is a big deal, for me. + +also, PGP is very slow. + +also, in case i haven't made this clear, PGP's UX is so bad that i recommend +people against using it at all. so, then, why do i use it? that's the question +i'm writing this post to answer. + + + ( + __________ )\ + / /\______{,} + \_________\/ + + +undoing my time bomb, with intent +================================= + +so, let's define my unique tooling requirements. + +getting passwords: +- i refuse to wait more than a few seconds for most common day-to-day operations. +- i refuse to type a huge long error-prone password +- therefore, the secret should be a *key* that i lug around, that can easily be rotated +- i want passwords to be loaded into my clipboard, pasted wherever my focus is, and then + my clipboard should clear instantly so i don't wind up pasting the password somewhere else +- the hotkey should be control+shift+p, and should react instantly (within 100ms) when pressed. +- i should type to filter passwords from a list, then press enter to select the one i like +- the hotkey should *not* press <return> for me. + +philosophy: + +i will use an unencrypted-at-rest key for convinience. +- my hard drive is encrypted, so nobody can just pull the drive and scrape the key +- if a malicious actor accesses my key, i'm screwed anyway, because: + - most short pass phrases can be bruteforced + - i would not make it long because typing long passphrases all the time sucks + - they have access to my system and can just keylog me + +my password files shall be kept in a private git repo +- the private part is "yet another layer" of obscurity - i don't want my encrypted file + history to be totally public becaaaauuuusssseeee if one of my keys gets exploited, welp, + they can pull out the previously encrypted files and go to town. +- this is up to user discretion obvs, you could put your passes in a public repo, that's fine + +entering new passwords, or changing existing passwords, or deleting passwords. +- this should be accomplished via a simple CLI tool that has the following requirements: + - the tool shall be called "pa" - longform: "password ass" + - `pa add <name-of-password>` shall make a new password, and randomly generate it + - if the name is already taken, exit 1 + - automatically git commits & pushes on exit 0 + - `pa show <password>` prints the encrypted file to stdout + - `pa del <password>` deletes a password (no warning) + - `pa list` lists all passwords + - `pa edit <password>` opens password file in $EDITOR + +i use linux at home, and macos at work, but i want +the same tooling to work on both of them. this means +simple posix sh + +so, i made pa: https://giit.cyberia.club/~j3s/pa + +the code is based off of dylan araps's wonderful pash, which i used +for awhile. + +here's an example of pa usage in action: + +$ pa list +/home/j3s/.age/key.txt not detected, generate a new one? [y/n]: y +Public key: age1sj9qx968gk40juqxeng0g8vjw6u5rc0vtvqw8dgkjt3usarmnqqsn6u89y + +$ cat .age/key.txt +# created: 2021-01-25T13:49:23-06:00 +# public key: age1sj9qx968gk40juqxeng0g8vjw6u5rc0vtvqw8dgkjt3usarmnqqsn6u89y +AGE-SECRET-KEY-1XYEUPJ9RUPPDA6DR9RPEQ0HHKLAAAAZYRYHTPE86HSYM8XZ8FEPQD46K8W + +$ pa list + +$ pa add garbage +Generate a password? [y/n]: y +Saved 'garbage' to the store. + +$ pa list +garbage + +$ pa show garbage +f3dYJ3Aq8jZ6Xx0fF2JcAXZpb_2G58pwvZ9Yk8bQ_4q_zL0r8e + +$ pa del garbage +Delete pass file 'garbage'? [y/n]: y + +$ pa add garbage +Generate a password? [y/n]: n +Enter password: +Enter password (again): +Saved 'garbage' to the store. + +$ pa edit garbage + + +what i love about this is that it can automatically generate your +age keys, and they work the same way as ssh keys - which lowers +the barrier to entry and understanding. +no need to fuss around with keychains, trust levels, daemons, etc. + +welp, enjoi! That's all for now, next I'll be demonstrating how to +tie pa into regular workflows - including dmenu for linux integrations. + + +j3s
A
idea/using-discord-is-morally-lazy.html
@@ -0,0 +1,57 @@
+<h3>Using Discord is Morally Lazy</h3> + +!unfinished article warning! + +Discord, to me, represents the worst of so-called "late stage capitalism" meshed with +the worst of our ever bloated and unmaintainable modern computer landscape. It comforts +people with the idea that using enormous amounts of computing resource is free. It bases +expectations on the ethical code of bloodthirsty hyper-capitalists. Grow the platform. +Capture the users. We'll figure out how to make money later. + +Discord is a US startup based in Silicon Valley. They have a downtown office, 500+ +employees, and a venture capital based operating budget. They don't delete data. They +don't have a reliable income scheme. So then, how exactly does Discord work? + +They take money. From investors. + +Discord has been raising money from investors for 8 years. They have raised +nearly a billion dollars. This money is not free. These investors expect a +return. So, Discord must become profitable. How much could it cost to run? + +A service with: + +- infinite data + attachment retention +- free unlimited signups +- no messaging limit +- server size limits of 100-250k +- 850 million send messages per day + + +<h3>Not my server</h3> + +Discords concept of "servers" tarnishes the actual meaning of the word "server." A +server is, generally speaking, a piece of compute that operates some software that +serves users in some way. Each server is isolated from each other server, and they +may run a mariad of difference pieces of software. They may be based in different +countries. + + +<h3>Wait, how do we make money again?</h3> + +Discord is not a financially feasible company. Let us examine some very conservative +projected operating costs: + +- 500 SF employees * $150,000/year +- 50000sqft SF office space +- 15 billion messages per month * 12 * 830 bytes per message on average + +<h3>Unsustainable Computing</h3> + +I would argue that moreso than any other piece of infrastructure used by people, +Discord has the highest potential to harm the world, and our perception of our +place within it. + + +unfinished. + +
M
main.go
→
main.go
@@ -6,12 +6,15 @@ "log"
"net/http" "os" "path/filepath" + "strings" ) func main() { fs := http.FileServer(http.Dir("./static")) http.Handle("/static/", http.StripPrefix("/static/", fs)) + http.HandleFunc("/review/", babyHandler) + http.HandleFunc("/idea/", babyHandler) http.HandleFunc("/", serveTemplate) log.Println("listening on :4666 tbh")@@ -54,3 +57,41 @@ log.Println(err.Error())
http.Error(w, http.StatusText(500), 500) } } + +func babyHandler(w http.ResponseWriter, r *http.Request) { + lp := filepath.Join("templates", "simple-layout.html") + fp := filepath.Join(strings.TrimPrefix(filepath.Clean(r.URL.Path), "/")) + + info, err := os.Stat(fp) + if err != nil { + if os.IsNotExist(err) { + http.NotFound(w, r) + return + } + } + + if info.IsDir() { + http.NotFound(w, r) + return + } + + content, err := os.ReadFile(fp) + if err != nil { + log.Println(err.Error()) + http.Error(w, http.StatusText(500), 500) + return + } + + tmpl, err := template.ParseFiles(lp) + if err != nil { + log.Println(err.Error()) + http.Error(w, http.StatusText(500), 500) + return + } + + err = tmpl.ExecuteTemplate(w, "simple-layout", string(content)) + if err != nil { + log.Println(err.Error()) + http.Error(w, http.StatusText(500), 500) + } +}
A
review/color-out-of-space.html
@@ -0,0 +1,6 @@
+besides a couple hilarious nic cage performances, this movie +lacked style, substance, plot, and consistency. honestly, +it was terrible, forgiven only because i have a soft spot +for nicolas and witches and the color purple. + +3/10
A
review/doctor-horrible.html
@@ -0,0 +1,3 @@
+this movie made me chuckle twice, and i don't like musicals. + +3/10
A
review/evil-dead-2013.html
@@ -0,0 +1,10 @@
+i found this remake honestly stunning. they stayed true to the +original and introduced a ton of new concepts. there is a little +bit of "dumb audience pandering" (a quirk of mine) but honestly +it's a very fun gorefest with evil demons and a ton of chaotic +fun. it feels a hell of a lot like evil dead the original remade, +and they used a ton of practical effects to stay honest. almost no +CG in the entire movie. this movie is firmly nested in my "i will love +these forever" list. + +8/10, closer to a 9 than a 7.
A
review/evil-dead.html
@@ -0,0 +1,8 @@
+short and punchy, but some scenes last too long. a classic horror +movie and the birthplace of many horror tropes. well worth the hour +it takes to watch if you're interested in horror films. + +campy and pretty funny even in the year of our lord 2020. +booze recommended + +6/10
A
review/it-follows.html
@@ -0,0 +1,18 @@
+If I were to use one word to describe It Follows, it would be "unsettling." + +it follows prays on that primal fear of being watched, like someone behind you is looking at you while you're alone. +there's really nothing else quite like it, and there are many details to love. For example: + +* the monster is never explained +* the characters never act irrationally +* the time is impossible to place +* people are swimming in one scene and wearing jackets in the next +* there was clearly a disaster of some kind +* everything feels... muted, somehow + +and the soundtrack... wow. it's really magnificent. + +this movie isn't for everyone - the pacing is slow, and if you're an absolute baby you won't be able to deal with the premise without laughing, and it might ruin the horror for you. +but if you're a big adult who likes horror mobie i really serious LOVE this one. cannot recommend it enough. + +10/10, exactly perfect in my book. will watch it many times to come.
A
review/jojo-rabbit.html
@@ -0,0 +1,7 @@
+somewhat funny sometimes but overall kinda lacking. + +has a good theme and doesn't dive into many stereotypes + +but doesn't do anything all that well either. + +5/10 felt very average
A
review/licorice-pizza.html
@@ -0,0 +1,18 @@
+i must admit, i saw this movie. + +it was very good! when the movie began, i thought that the actors were AWFUL and joking. + +seriously, the beginning of this movie is so awkward. + +but as i continued watching, i realized that these actors were very good! i felt +bought into their characters and found them extremely convincing. i was absolutely +sucked into their romance. + +so, when i reflected on that early scene later, instead of mentally framing it as +"these actors are awful", i instead thought "they were such an awkward couple" - this +made me realize that i had been duped. they played an awkward early romance couple so +effortlessly that i thought they were awkward actors! + +still not sure how to feel about being deceived, but the movie was great. + +8/10
A
review/meet-the-fockers.html
@@ -0,0 +1,5 @@
+awful garbage, i have a visceral reaction just +thinking about this film. ben stiller at his +absolute worst. + +2/10
A
review/spencer.html
@@ -0,0 +1,5 @@
+i liked this movie quite a lot! i thought that kristen stewart did an awesome job. +sometimes the british-ness of it got to me and i thought god +why do british people talk like that + +6-7/10
A
review/the-lighthouse.html
@@ -0,0 +1,15 @@
+hereditary, midsommar, it follows, vvitch - + +slow burning masterpieces all. another name +is added to the list: The Lighthouse. + +a slow, delirious tale of two men stuck with +one another in the middle of the ocean. + +instant classic. horror of the unknown, +mentally ravaging, lovecraftian, + +i think they chose 4:3 black and white to +make everything feel bleak and cramped + +masterpiece. 10/10. genuinely amazing.
A
review/the-revenant-2009.html
@@ -0,0 +1,7 @@
+just awful in every way. dude bro energy, and it's from 2009. +throwing around every slur for shock comedy, it doesn't work. + +acting was also thoroughly bad, no redeeming qualities, will +not recommend or ever think about again + +2/10
A
review/uncut-gems.html
@@ -0,0 +1,9 @@
+uncut gems + +was so fucking good. + +i'll write a more proper review sometime, probably +a long one. but it was without a doubt one of the +best films i've ever seen. + +10/10
M
templates/about.html
→
templates/about.html
@@ -1,4 +1,11 @@
{{define "title"}}small ideas{{end}} {{define "body"}} -<p><i>shit-ass description of myself</p></i> +<p><i>patient anxious mentor</p></i> +<p><i>loves little tiny depless golang binaries</p></i> +<p><i>dota2 + beat saber expert</p></i> +<p><i>existential crisis actor</p></i> +<b><p>email:</b> <a href="mailto:j3s@c3f.net">j3s@c3f.net</a></p> +<b><p>matrix:</b> <a href="https://matrix.to/#/@j3s:cyberia.club">@j3s:cyberia.club</a></p> +<b><p>twitter:</b> <a href="https://twitter.com/j3sj3sj3s">@j3sj3sj3s</a></p> +<p><b>age pubkey:</b> age12amwzaps3lfy5y7kup5h730d2alfcpxlrnahgxv7u4a877hl9c8s6h2wuf</p> {{end}}
A
templates/git.html
@@ -0,0 +1,6 @@
+{{define "title"}}jes shit git{{end}} +{{define "body"}} +<p><i>my shitty git server iframe</i></p> +<p><i>(also available at <a href="https://git.j3s.sh">git.j3s.sh</a>)</p></i> +<iframe width=800 height=800 src="https://git.j3s.sh"></iframe> +{{end}}
M
templates/index.html
→
templates/index.html
@@ -1,11 +1,10 @@
{{define "title"}}j3s.sh{{end}} {{define "body"}} -<p><i>the only way out is through</p></i> -<p><i>the only way out is through</p></i> -<p><i>the only way out is through</p></i> +<marquee><p><i>new! dynamically generated! smol! website! <3</p></i></marquee> +<h4>important quotes</h4> <p><i>the only way out is through</p></i> <p><i>fear is the mind-killer</p></i> -<p><i>fear is the mind-killer</p></i> -<p><i>fear is the mind-killer</p></i> -<p><i>fear is the mind-killer</p></i> +<h4>posts from my friends around the net</h4> +<p><i>coming soon</i></p> +<img src="/static/under-construction.gif"> {{end}}
M
templates/layout.html
→
templates/layout.html
@@ -3,11 +3,7 @@ <!doctype html>
<html> <head> <style> -#main, #header, aside { - max-width: 444px; - margin: 0 auto; - padding: 0; -} + #main, #header, aside, img { max-width: 444px; margin: 0 auto; padding: 0; } nav ul { list-style: none; padding: 0; margin: 0 45px 30px 0; float: left; } .grayscale { -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); -ms-filter: grayscale(100%); filter: grayscale(100%); } </style>@@ -20,13 +16,14 @@ <div id="main"><body class="grayscale">
<h1><a href="/"><img src="/static/scrombles.png" alt="scrombles the cat"></a> jes shit hell</h1> <p> + <a href="/now.html">now</a> + <a href="/about.html">about</a> + <a href="/reviews.html">reviews</a> <a href="/ideas.html">ideas</a> - <a href="/movies.html">movies</a> - <a href="/blog.html">bl0g</a> - <a href="/about.html">about</a> + <a href="/git.html">git</a> | + <a href="https://write.as/j3s">bl0g -></a> <a href="https://snap.as/j3s">pics -></a> - <a href="https://git.j3s.sh">git -></a> </p> <hr> {{template "body"}}
A
templates/now.html
@@ -0,0 +1,29 @@
+{{define "title"}}what is jes doing now{{end}} +{{define "body"}} +<p><b>2022-01-28</b></p> +<li>started friday night crafting @ layer zero</li> +<li>rebuilt my blog :D</li> +<p><b>2022-01-03</b></p> +<li>had thanksgiving</li> +<li>and christmas too</li> +<li>funded and built layer zero</li> +<li>warning: high tide</li> +<p><b>2021-07-23</b></p> +<li>king died</li> +<li>moved in with bri <3</li> +<li>bought a miata and a house</li> +<li>started at digitalocean</li> +<li>working on shrapnl in my offtime</li> +<p><b>2021-03-06</b></p> +<li>feeling old</li> +<li>finally getting my teeth fixed, after years of neglect</li> +<li>thinking about going on psych meds again</li> +<li>struggling</li> +<p><b>2021-01-13</b></p> +<li>had a merry christmas</li> +<p><b>2020-10-07</b></p> +<li>developing a fully libre version of <a href="https://capsul.org">capsul</a></li> +<li>made jrss - my feed is <a href="/feeds">here</a></li> +<li>set up a ci/cd system for cyberia <a href="https://builds.cyberia.club">linky</a></li> +<li>moved in with some of my very good friends</li> +{{end}}
A
templates/reviews.html
@@ -0,0 +1,28 @@
+{{define "title"}}jes reviews arbitrary garbage{{end}} +{{define "body"}} +<p><i>i like to review movies, distros, and other stuff too</p></i> +<h4>2022</h4> +<li><a href="/review/saw-series.html">saw (all of them)</a></li> +<h4>2021</h4> +<li><a href="/review/spencer.html">spencer</a></li> +<li><a href="/review/uncut-gems.html">uncut-gems</a></li> +<li><a href="/review/the-lighthouse.html">the-lighthouse</a></li> +<li><a href="/review/jojo-rabbit.html">jojo-rabbit</a></li> +<li><a href="/review/licorice-pizza.html">licorice pizza</a></li> +<li><a href="/review/videodrome.html">videodrome</a></li> +<h4>2020</h4> +<li><a href="/review/alien.html">alien</a></li> +<li><a href="/review/aliens.html">aliens</a></li> +<li><a href="/review/color-out-of-space.html">color-out-of-space</a></li> +<li><a href="/review/doctor-horrible.html">doctor-horrible</a></li> +<li><a href="/review/evil-dead-2013.html">evil-dead-2013</a></li> +<li><a href="/review/evil-dead.html">evil-dead</a></li> +<li><a href="/review/it-follows.html">it-follows</a></li> +<li><a href="/review/meet-the-fockers.html">meet-the-fockers</a></li> +<li><a href="/review/possessor.html">possessor</a></li> +<li><a href="/review/tenet.html">tenet</a></li> +<li><a href="/review/the-revenant-2009.html">the-revenant-2009</a></li> +<li><a href="/review/zenith.html">zenith</a></li> +<hr> +<img src="/static/tvscrombles.png" alt="scrombles the cat watching tv"> +{{end}}
A
templates/simple-layout.html
@@ -0,0 +1,21 @@
+{{define "simple-layout"}} +<!doctype html> +<html> +<head> + <style> + #main, #header, aside { max-width: 444px; margin: 0 auto; padding: 0; } + nav ul { list-style: none; padding: 0; margin: 0 45px 30px 0; float: left; } + .grayscale { -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); -ms-filter: grayscale(100%); filter: grayscale(100%); } + </style> + + <meta charset="utf-8"> + <title>jes post</title> + <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22><text y=%2226%22 font-size=%2226%22>🐈⬛</text></svg>"> +</head> +<div id="main"><body class="grayscale"> + <a href="/"><img src="/static/scrombles.png" alt="scrombles the cat"></a> + <hr> + <pre>{{ . }}</pre> +</div></body> +</html> +{{end}}