about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorFilesLines
2020-03-16 Work on "Let's Learn Nix: Dotfiles" blog postWilliam Carroll1-2/+394
It has been awhile since I have written a tutorial. I have spent 2-3 hours working on this post, but I think I need to spend another 2-3 hours before I publish it. I expect to be able to write these posts faster as I practice. I would like to create a few resources that I can reuse in each article for things like: - "Let's Learn Nix" reproducibility: Where I list all of the tutorials' dependencies: nix version, <nixpkgs> version, OS type and version, etc. - Haskell type signature convention for Nix - Ad hoc vs. declarative configuration for Nix - Troubleshooting Nix: <nixpkgs> search, nix repl, searching the Nix codebase
2020-03-16 Create derivation for learn.wpcarro.devWilliam Carroll3-3/+12
Creating a derivation to abstract over the build process for learn.wpcarro.dev.
2020-03-16 Delete .xsessionrcWilliam Carroll1-22/+0
Nix home-manager generates an .xsession file for me. I believe there are a few files for managing X-sessions: - .xinitrc - .xsession - .xsessionrc: Only exists on Debian systems, which is why home-manager generates an .xsession file instead. gLinux is a Debian system. Whenever I close Emacs, another Emacs initializes. I believe this is because after I allowed home-manager to manage my X-sessions, I unintentionally supported two X-session configuration files: .xsession and .xsessionrc; both of these files initialize Emacs. I'm deleting my .xsessionrc, and I'm hoping that will remove the issue.
2020-03-16 Support autorandrWilliam Carroll1-0/+46
Enable autorandr with Nix home-manager. I discovered autorandr when looking through the home-manager source code. I was hoping it would automatically enable/disable my external monitor when I connect/disconnect my HDMI cable, but it doesn't. With autorandr, I run... ```shell > autorandr --load mobile ``` ...to load my randr settings for just my laptop without the external monitor, and I run... ```shell > autorandr --load docked ``` ...to load my randr settings for my external monitor. I'm not sure if this brings much more value than my existing display.el module, but I'm willing to try it for now.
2020-03-16 Remove setting for enabling both laptop and external monitorWilliam Carroll1-1/+1
Currently I prefer working with one screen at a time, so I'm preferring to toggle between external monitor and laptop monitor.
2020-03-16 Solve InterviewCake's second-largest-item-in-bstWilliam Carroll2-2/+221
Return a function that returns the second largest item in a binary search tree (i.e. BST). A BST is a tree where each node has no more than two children (i.e. one left child and one right child). All of the values in a BST's left subtree must be less than the value of the root node; all of the values in a BST's right subtree must be greater than the value of the root node; both left and right subtrees must also be BSTs themselves. I solved this problem thrice -- improving the performance profile each time. The final solution has a runtime complexity of O(n) and a spacetime complexity of O(1).
2020-03-15 Solve InterviewCake's bst-checker problemWilliam Carroll2-2/+112
Write a function that returns true if a given binary tree is a valid binary search tree (i.e. if all of root's left nodes are less than root.value, all of root's right nodes are greater than root.value, and both left and right subtrees are also valid binary search trees).
2020-03-14 Solve InterviewCake's balanced-binary-tree problemWilliam Carroll2-2/+128
Write a predicate for determining if a binary tree is "super balanced", which means that the depths of all of the tree's leaves are equal or differ by at most one.
2020-03-14 Mark duplicate InterviewCake questions as DONEWilliam Carroll1-2/+2
I wrongfully assumed that the relationship between a question and a question category was one-to-one; it is actually one-to-many. This explains why I completed the "Cafe Order Checker" and "Top Scores" questions twice. I'm marking the questions that I've completed as DONE because I would prefer to do every question once and then prioritize repeating the questions with which I experienced difficulty.
2020-03-13 Remove UK qualifier to LondonWilliam Carroll1-2/+2
Vincent tells me that saying "London, UK" is a very *American* thing to do. I think that is his polite way of telling me that it's naive.
2020-03-13 Fix broken link to @tazjin's TwitterWilliam Carroll1-1/+1
Link to @tazjin's Twitter instead of @dmjio's Twitter.
2020-03-13 Move wrapNonNixProgram to utils moduleWilliam Carroll4-10/+24
Define the wrapNonNixProgram in my Nix utils module.
2020-03-13 Init the "Let's Learn Nix" blog seriesWilliam Carroll2-0/+67
I'm creating a short blog series to help newcomers learn Nix.
2020-03-13 Define wrapNonNixProgram as a helper utilityWilliam Carroll1-8/+7
Write a simple Nix expression to DRY up my writeShellScriptBin wrapper pattern.
2020-03-13 Prefer locally installed /usr/bin/gitWilliam Carroll1-0/+3
From what I understand, gLinux and Nix are sometimes compatible and sometimes incompatible. Some nix-installed programs rely on system state that differs from gLinux's system state. In other cases, Google wraps existing programs (e.g. git) to provide Google-specific configuration. Ever since I switched to home-manager and set `programs.git.enable = true`, magit, which uses the git that PATH exposes hasn't been able to push, fetch, and a few other commands. TODO(wpcarro): Define a base home.nix that my gLinux and NixOS machines can extend.
2020-03-13 Add default value for pkgs parameter in shell.nixWilliam Carroll1-1/+1
Commands like `nix-shell shell.nix` couldn't resolve `pkgs` without a default value. I'm unsure how I expected this to work previously...
2020-03-13 Solve InterviewCake's top-scores problemWilliam Carroll2-1/+59
Write a function to sort a list of scores for a game in linear time. While I had previously solved this in python, I hadn't marked the todo.org file, so I ended up doing this again. "Perfect practice makes perfect."
2020-03-13 Define fish function, ptreeWilliam Carroll1-0/+9
Get all pstree outputs for a given process name. Usage: ```fish > ptree ssh-agent ``` I'm unsure if I like home-managers; I'd prefer defining this functions in a functions.fish file for a few reasons: - I like syntax highlighting. - home-manager compiles this into poorly formatted fish code.
2020-03-13 Extend default-cache-ttl and max-cache-ttl for gpg-agentWilliam Carroll1-2/+2
Preferring eight hours for each of these values.
2020-03-13 Restore ssh-agent initialize in ~/.profileWilliam Carroll1-0/+6
For two days I tried using gpg-agent to emulate ssh-agent, but it did not work the same way as ssh-agent. For example, gcert stopped working. Also, when I tried adding keys to ~/.gnupg/sshcontrol using `ssh-add ~/.ssh/id_rsa`, the command failed. While the concept of reusing gpg-agent for ssh-agent appeals to me... - Fewer agent processes - pinentry support ...in practice, it fell short of my expectations. Some or all of this may be because I tried running this on a gLinux machine.
2020-03-11 Remove the "Professional Emacs" blog postWilliam Carroll1-14/+0
I don't intend to finish this blog post and since my blog is live, I'd rather not show it on the internet.
2020-03-11 Add drafts for future blog postsWilliam Carroll3-0/+16
- caffeine.md: an explanation of my theory that caffeine antagonizes mindfulness. - nix-and-hugo.md: a short tutorial explaining how I use Nix, the package manager and Hugo, the static site generator, to host my blog. - self-hosting.md: explain how I installed NixOS on my used Acer laptop.
2020-03-11 Add social channels to footer of learn.wpcarro.devWilliam Carroll1-2/+5
Per Mimi's suggestion, I think adding these channels helps customers better understand that I'm a real person.
2020-03-11 Emphasize copy for learn.wpcarro.devWilliam Carroll1-2/+4
- Embolden money amounts - Italicize "Start today."
2020-03-10 Attempt to support gogsWilliam Carroll1-0/+17
Gogs claims to be an easy-to-use Git server and web frontend written in golang. I'm eager to try it as an alternative to cgit.
2020-03-10 Support unclutter with home-managerWilliam Carroll1-0/+3
I removed the code that initializes unclutter from .profile - preferring to start it with home-manager.
2020-03-10 Support keynav with home-managerWilliam Carroll1-0/+3
I removed the startup code from .profile. I also depend on a fork of home-manager until I submit my PR from wpcarro/home-manager into rycee/home-manager.
2020-03-10 Manage xsession with home-managerWilliam Carroll1-0/+5
redshift didn't properly work because it couldn't read the DISPLAY environment variable. I can fix this ad-hoc with `systemctl --user import-environment DISPLAY`, but home-manager will do this automatically if I allow it to manage my xsession.
2020-03-10 Support redshiftWilliam Carroll1-0/+11
redshift is the f.lux of Linux; it filters blue light from your screen.
2020-03-10 Restore Emacs serverWilliam Carroll1-0/+3
I think I removed the `(server-start)` call when I was debugging some EXWM issues. I have stabilized my configuration considerably since then, and I'd like to use the Emacs server.
2020-03-10 Remove dockerd startup from .profileWilliam Carroll1-3/+0
1. I haven't used docker in awhile. 2. If I need to restore the docker daemon, I will reach for a home-manager solution.
2020-03-10 Remove PATH additions from .profileWilliam Carroll1-11/+0
I'd like to remove this and prefer using Nix-based solutions for PATH maintenance.
2020-03-10 Remove RUST_SRC_PATH from .profileWilliam Carroll1-3/+0
I'm not doing enough Rust development to justify supporting this. I'm also in the midst of a cleaning frenzy, so it's possible that this is just collateral damage. I don't think it is because I can always use lorri to set this value when I'm writing Rust (hopefully the second 1/2 of this year).
2020-03-10 Define additional systemctl fish abbreviationsWilliam Carroll1-0/+2
I often run `systemctl --user status <some-unit>`
2020-03-10 Manage session variables with home-managerWilliam Carroll2-7/+3
If you haven't noticed, home-manager is managing increasingly more of my configuration. - Migrate session variables to home.nix - Drop support for unused session variables like TERMINAL, VISUAL
2020-03-10 Remove ssh-agent code from .profileWilliam Carroll1-3/+0
TIL: gpg-agent sets the SSH_AUTH_SOCK and other values. Since I already use home-manager to start gpg-agent and SSH has been functioning without issues, I'm removing the obsolete ssh-agent code.
2020-03-10 Configure keyboard preference with home-managerWilliam Carroll2-7/+7
Preferring home-manager to reduce some of the clutter I've created.
2020-03-10 Configure bat to use a different themeWilliam Carroll1-1/+1
Whatever bat's default theme for syntax highlight is, I cannot read it with my current theme.
2020-03-10 WIP: Partially solve InterviewCake's find duplicate numberWilliam Carroll1-0/+70
Write a function that finds one duplicate number from a list of numbers 1..n. The function should satisfy the following performance objectives: Runtime complexity: O(n*log(n)) Space complexity: O(1)
2020-03-10 Add Google Analytics to learn.wpcarro.devWilliam Carroll1-0/+10
Ten people have visited https://learn.wpcarro.dev, but no one has emailed me yet. I'd like to learn more about how people are using my website.
2020-03-10 Ad Google AdSense script to blog.wpcarro.devWilliam Carroll1-0/+1
I'm adding Google Ads to my blog to: - learn more about Google AdSense - attempt to offset the my advertising costs for learn.wpcarro.dev I may need to surround the <script></script> tags with markup to positions the ads optimally. I will publish this first, see what it looks like without any markup, and then progress.
2020-03-10 Lint hugo Tailwind themeWilliam Carroll1-3/+3
My Emacs automatically trims trailing whitespace when I save a buffer. As a result, this diff appears whenever I edit the baseof.html file. Instead of continuing to ignore the diff, I'm committing it.
2020-03-10 Draft blog post about March's cell phone challengeWilliam Carroll1-0/+92
Started working on my debut blog post about giving up my cell phone during march. I'd like to publish this post by the end of the month, once I conclude the experiment. At that time, I'd like to change the voice of some the content to be past test. For now, I'm dumping ideas here while they're fresh in my mind. I will refine and prune the final post later.
2020-03-10 Initialize //blog with lorriWilliam Carroll2-0/+10
To create new posts, I run... ```shell hugo new name-of-post.md ``` While writing posts, I run... ```shell hugo serve -D ``` I need hugo available on PATH environment variable, which lorri provides.
2020-03-10 Update Tailwind themeWilliam Carroll1-2/+2
Thing I changed: - prefer a white background - simplify the footer text Other things that I'd like to change: - use JetBrains Mono for the mono-font
2020-03-10 Rename my-first-postWilliam Carroll1-0/+0
I created this file while following Hugo's quick-start tutorial. When I publish a blog post, I will delete this file.
2020-03-10 Solve InterviewCake's "find rotation point" problemWilliam Carroll2-1/+69
Write a function that accepts a rotated cycle of alphabetically sorted strings and returns the index what should be the first element if the elements were not rotated.
2020-03-09 Nixify hugo deploymentWilliam Carroll2-1/+13
Create a derivation for building the static files of my blog.
2020-03-09 Add 'blog/themes/tailwind/' from commit ↵William Carroll23-0/+377
'2cf446f4ef7bdcc4303ebcb0a3062e87cde4928b' git-subtree-dir: blog/themes/tailwind git-subtree-mainline: d206a2812fc07e9ae8af016d3dc9d24a8bcf0508 git-subtree-split: 2cf446f4ef7bdcc4303ebcb0a3062e87cde4928b
2020-03-09 Prefer hugo for blog.wpcarro.devWilliam Carroll9-104/+46
Instead of creating my own static website generator, I'm trying Hugo. Huge is a newer alternative to Jekyll. So far, I like what I see. - Ignoring /blog/public since this is where `huge -D` generates the static assets. - Using a TailwindCSS theme. - Creating a dumby post about Emacs to test deployments. - Deleting all Common Lisp and Nix code that powered my previous, half-baked blog.