about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorFilesLines
2020-03-25 Create wpcarro.dev/goalsWilliam Carroll9-21/+3705
Create a simple React app to define my goals. See the goals/README.md for more context.
2020-03-24 Add @types/node to typescript boilerplateWilliam Carroll2-0/+6
Parcel uses process.env to expose environment variables. Since process.env is a Node concept and this boilerplate is for TypeScript projects, we need @types/node to support these Node types.
2020-03-24 Add sandbox project using Contentful CMSWilliam Carroll16-0/+5965
I used the boilerplate/typescript project as a starting point. This project fetches and renders books that I'm defining in a Contentful CMS that I created.
2020-03-24 Move nut-score into website/sandboxWilliam Carroll15-9/+7
Also move some .gitignore entries from the top-level .gitignore into a subdirectory .gitignore.
2020-03-24 Delete mail/William Carroll1-6/+0
I do not use this. In the interest of trimming fat, I'm removing it.
2020-03-23 Support boilerplate for TypeScript projectsWilliam Carroll16-0/+5906
I would like to support boilerplate code for ReasonML, TypeScript, ClojureScript, and Elm projects before I specialize in any of these frameworks. All of my projects should use TailwindCSS. All of this boilerplate should offer: - Same command to start developing - Same API to build and deploy - TailwindCSS support - Basic boilerplate for components, state, and routes This TypeScript boilerplate is not complete, but I would like to commit the progress in case I do not return to this for awhile.
2020-03-20 Change the value of constants/current-projectWilliam Carroll1-1/+1
Yesterday evening, I moved the blog directory to website/blog; I forgot to update this value.
2020-03-20 Solve InterviewCake.com's mesh-message problemWilliam Carroll2-1/+184
Write a function that returns the shortest path between nodes A and B in an unweighted graph. I know two algorithms for finding the shortest path in a *weighted* graph: - Use a heap as a priority queue instead of the regular queue that you would use when doing a BFT. This is called Dijkstra's algorithm. You can also use Dijkstra's algorithm in an unweight graph by imaginging that all of the weights on the edges are the same value (e.g. 1). - Map the weighted graph into an unweighted graph by inserting N nodes between each node, X and Y, where N is equal to the weight of the edge between X and Y. After you map the weighted graph into an unweighted graph, perform a BFT from A to B. A BFT will always find the shortest path between nodes A and B in an unweighted graph. I had forgotten that a BFT in an unweighted graph will always return the shortest path between two nodes. I learned two things from InterviewCake.com's solution: 1. I remembered that a BFT in an unweighted graph will return the shortest path (if one exists). 2. I learned to use a dictionary to store the edge information and then back-tracking to reconstruct the shortest path.
2020-03-20 Unbind <SPC> in evil's motion mapWilliam Carroll1-1/+1
By default this just advances the point one character, which I don't use nor want especially because my leader key is the space key.
2020-03-20 Support KBD for toggling linum-modeWilliam Carroll1-2/+1
I would like to restore the good practice of jumping precisely to line numbers within buffers.
2020-03-20 Move sandbox into websiteWilliam Carroll12-67285/+3
Nest the sandbox work under ./website.
2020-03-20 Move learn to website/learnWilliam Carroll5-2/+1
Nest the learn directory in the website directory.
2020-03-20 Move blog into website/blogWilliam Carroll40-3/+2
Nest the blog work within the website directory.
2020-03-20 Add sitemap to wpcarro.devWilliam Carroll14-4/+79
- Create ./website directory - Add a sitemap to wpcarro.dev - Move covid-uk directory to sandbox directory TODO: Next sandbox, blog, and learn in the website directory
2020-03-19 Attempt to serve sandbox.wpcarro.dev/covid-19William Carroll1-1/+3
Right now my website is serving at sandbox.wpcarro.dev, but I would rather people view it at sandbox.wpcarro.dev/covid-19. I previously tried to accomplish this with the following Nginx configuration: ```nix locations."/covid-19" = { root = briefcase.covid-uk; } ``` I am now trying `alias = ...` instead of `root = ...`. I got the idea from this SO question, https://stackoverflow.com/questions/10631933/nginx-static-file-serving-confusion-with-root-alias.
2020-03-19 Solve InterviewCake's graph-coloring problemWilliam Carroll3-1/+240
Write a function that colors the nodes of a graph such that no two neighbors share a color.
2020-03-19 Update COVID-19 webpageWilliam Carroll10-51430/+67916
- Prefer hosting on sandbox.wpcarro.dev; I would prefer to host it at sandbox.wpcarro.dev/covid-19, but I haven't figure out how to use Nginx to do serve locations like /covid-19 yet. - Splice the src directory: When I develop locally and index.html exists within ./src, I cannot access ./node_modules because ./node_modules is in a parent directory. I could fix this if I used a bundler like Parcel or Webpack, but I do not want to set that up at this time. - Introduce Tailwind for CSS. This complicates my build a bit as well. For now, I'm including output.css even though ideally I should not version-control this file. I haven't figured out how to `yarn install` and run commands like `npx tailwindcss build styles.css -o output.css` in a Nix derivation yet. Hopefully I will learn and refactor this. - Add some content about why I made this chart - Add some content about some of my covid-19 predictions - Add a footer to the webpage - Delete timeseries.json and prefer fetching the published data instead
2020-03-19 Prefer live timeseries.jsonWilliam Carroll1-1/+1
When I was first developing this, and I attempt to access https://pomber.github.io/covid19/timeseries.json, the browser prevents me from reading the data because it violates the same origin policy. I'm learning more about CORS, and I'm going to try consuming this from... https://wpcarro.dev -> https://pomber.github.io ...instead of... http://localhost:8000 -> https://pomber.github.io ...because the http -> https protocol violates CORS. I will not know unless I try, so... bombs away.
2020-03-18 Remove git.wpcarro.dev entry fron Nginx configWilliam Carroll1-7/+0
This is not currently working and it is causing Nginx to enter a retry loop. I am removing it until I choose to focus on it.
2020-03-18 Create line chart of UK confirmed corona virus casesWilliam Carroll8-0/+51515
I was having trouble tracking the growth of corona virus cases in the UK. Thankfully someone is publishing some daily COVID data as JSON. I downloaded that data manually and plotted it using the chart.js library as a programming exercise with Mimi. Now I'm attempting to deploy to https://wpcarro.dev/covid-uk. TODO(wpcarro): Prefer the live API data instead my soon-to-be-stale downloaded.
2020-03-17 Scatter blog post ideas for "Let's Learn Nix"William Carroll3-0/+211
I may not use any of these. I'm just scrawling notes as blog posts to see if anything sticks.
2020-03-17 Add ReasonML boilerplateWilliam Carroll14-0/+484
After some toil, I finally support basic ReasonML starter code. I'm adding it to the nut-score directory because I would like to make a simple webpage that render some nutritional facts about nuts with respect to the ketogenic diet. I'm not sure if I should include or exclude te .bs.js files. See the README.md for more information.
2020-03-17 Disable redshift's fading animationWilliam Carroll1-0/+2
I originally passed the options `[ "-o" "-P" ]` to disable redshift's fading animation, but what I wanted originally was the `[ "-r" ]` option.
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.