Commit graph

15150 commits

Author SHA1 Message Date
William Carroll
1fbdec0d6a Initialize //blog with lorri
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 13:27:11 +00:00
William Carroll
1e75f709ee Update Tailwind theme
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 13:27:11 +00:00
William Carroll
220c6d138b Rename my-first-post
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 13:27:11 +00:00
William Carroll
58ed992059 Solve InterviewCake's "find rotation point" problem
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-10 13:27:11 +00:00
Abseil Team
d936052d32 Export of internal Abseil changes
--
2c5c118f0615ba90e48ee2f18eccc9f511740f6d by Samuel Benzaquen <sbenza@google.com>:

Rename internal macros to follow the convention in absl.

PiperOrigin-RevId: 299906738

--
92d84a707c7ebc4ec19bdd92d5765d1b6d218c1e by Derek Mauro <dmauro@google.com>:

Import GitHub #629: Skip the .exe suffix in the helpshort filter on Windows

PiperOrigin-RevId: 299892396

--
2a6910d4be6c67a8376628764121b528ff53504d by Abseil Team <absl-team@google.com>:

Use unsigned int128 intrinsic when available. It generates better branchless code.

PiperOrigin-RevId: 299848585

--
110c16cf0a739e1df5028fb6fbd03ef5dde1d278 by Derek Mauro <dmauro@google.com>:

Import GitHub #594: Avoid reading the registry for Windows UWP apps

PiperOrigin-RevId: 299821671

--
d8397d367e88163e5e8a47f379c716352dc91d03 by Greg Falcon <gfalcon@google.com>:

Add absl::Hash support for Cord.  The hash function is heterogeneous with other string types: a Cord and a string with the same byte sequence will hash to the same value.

SwissTable types know about Cord, and will allow heterogeneous lookup (e.g., you can pass a Cord to flat_hash_map<string, T>::find(), and vice versa.)

Add a missing dependency to the cmake Cord target.

PiperOrigin-RevId: 299443713
GitOrigin-RevId: 2c5c118f0615ba90e48ee2f18eccc9f511740f6d
Change-Id: I7b087c7984b0cb52c4b337d49266c467b98ebdf9
2020-03-09 16:10:21 -04:00
Pavel Samolysov
238b9a59c8
Skip the .exe suffix in the helpshort filter on Windows (#629)
On Windows, the `flags_internal::ShortProgramInvocationName()`
function usually returns the program name with '.exe' (if the
extension is present in the command line during the program startup).
This fact breaks the checks in the `ContainsHelpshortFlags` filter:
obviously, module names have no .exe in them. Therefore, no defined flags
are shown when the program runs with the --help flag. The program name
should be used in filter without this extension even though it is present.

The unit test has also been updated.

Signed-off-by: Pavel Samolysov <samolisov@gmail.com>
2020-03-09 14:37:46 -04:00
William Carroll
b929a6bb57 Nixify hugo deployment
Create a derivation for building the static files of my blog.
2020-03-09 15:35:12 +00:00
Griffin Smith
c033b9161c Add org-clubhouse-set-epic
Add an org-clubhouse-set-epic command, to change the clubhouse epic of
the story at point
2020-03-09 10:50:28 -04:00
William Carroll
6e4c721be5 Add 'blog/themes/tailwind/' from commit '2cf446f4ef7bdcc4303ebcb0a3062e87cde4928b'
git-subtree-dir: blog/themes/tailwind
git-subtree-mainline: d206a2812f
git-subtree-split: 2cf446f4ef
2020-03-09 13:31:09 +00:00
William Carroll
d206a2812f Prefer hugo for blog.wpcarro.dev
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.
2020-03-09 13:27:35 +00:00
Augusto Righetto
417ea99cba
UWP doesn't allow reading regkeys (#594)
* UWP doesn't allow reading regkeys.

Unfortunately, UWP also doesn't offer an API for returning nominal processor frequency at this moment. Other options would require apps depending on abseil-cpp to be packaged with extra manifest data or libraries for bridging platforms.

This change pushes the unsupported APIs accessing the registry behind a define guard. This define guard makes GetNominalCPUFrequency to compile and run as usual on desktop, but it will return the value 1.0 on UWP Apps (Store).

* Using WINAPI_FAMILY_PARTITION family of macros for detecting when building for
UWP or Desktop.

* Simplifying comment to please the lint tool.
2020-03-09 08:55:40 -04:00
Vincent Ambo
049709a7f3 fix(tools/emacs): Set correct file name format for org-journal 2020-03-09 01:07:32 +00:00
Vincent Ambo
9372f57659 feat(tools/emacs): Configure org-journal
Configures org-journal to store journal files on camden and encrypt
them to my GPG key.

Journal entries are weekly, with weeks starting Saturday (yes, there's
a reason for this).
2020-03-09 01:00:11 +00:00
Vincent Ambo
15ae7fadb8 fix(tools/emacs): Set scratch buffer to Emacs Lisp mode
This used to be the case, but it changed to lisp-interaction-mode at
some point which is incredibly annoying.
2020-03-09 00:16:18 +00:00
Vincent Ambo
067acdbcae chore(tools/emacs): Configure all-tags list in notmuch-hello
I've been setting these options manually in my sessions for some
reason. Let's make it official!
2020-03-09 00:08:33 +00:00
Vincent Ambo
28ec16e618 feat(tools/emacs): Add a function to graph unread emails per label
This uses the built-in chart.el library to create a quick graph of the
number of unread emails in each notmuch tag. Some generic tags are
excluded from the overview.
2020-03-08 23:58:01 +00:00
Vincent Ambo
65e533431a refactor: emacsPackagesNg -> emacsPackages
The former is now just an alias for the latter anyways.
2020-03-08 23:20:03 +00:00
Vincent Ambo
6cbcadc2e4 feat(tools/emacs): Install org-journal & org-ql 2020-03-08 23:16:44 +00:00
Vincent Ambo
825acd60e4 chore(third_party): Bump nixos-unstable channel 2020-03-08 23:13:40 +00:00
William Carroll
2e0ad09a02 Increase vertical margins for splash text
I'm attempting to follow the principles the TailwindCSS authors wrote in their
design book: To space properly, zealously space.
2020-03-08 22:10:23 +00:00
William Carroll
7924b12fa6 Add "Why delay? Start today." to footer
For now, my slogan is "Why delay? Start today."

Like any slogan, the more you repeat it, the more it sticks.
2020-03-08 22:09:22 +00:00
William Carroll
2285fc8b36 Embolden "You will be coding from day one."
Emphasize the fact that students will start coding on the first day.
2020-03-08 22:08:40 +00:00
William Carroll
4bc9bb4910 Prefer "Learn to code" to "Learn to program"
I think this is more consistent with the main content.
2020-03-08 22:07:57 +00:00
William Carroll
669b728e49 Adjust learn.wpcarro.dev's styles for all devices
- Add a max width to constraint the width of the content
- Add horizontal padding to improve readability on handheld devices
- Reduce the font size of all headings
2020-03-08 19:23:19 +00:00
William Carroll
5fd094d39c Replace ~ with /home/wpcarro
Nix runs the `rebuild` command as root, so ~ resolves to /root, which is not
what I want.
2020-03-08 19:14:08 +00:00
William Carroll
9b49731c02 Use static directory path as root for learn.wpcarro.dev
With this simple change, Nix should copy the static directory and all of its
contents to /nix/store and return the path to that directory.

See TODO for more what I would have liked to do ideally.
2020-03-08 19:11:10 +00:00
William Carroll
a9bd18c440 Move index.html to static directory
I only want nginx to serve files from the static directory, so that I do not
accidentally expose files like default.nix or README.md to the web.
2020-03-08 19:10:35 +00:00
William Carroll
280956a466 Update markup for learn.wpcarro.dev
Adding a personal introduction, overview of coding, pricing, and contact
information.

Also using a CDN to install TailwindCSS, which the TailwindCSS authors
discourage, but I don't want to setup a complicated build process at the
moment.
2020-03-08 18:58:06 +00:00
William Carroll
688cd1d912 Add content for learn.wpcarro.dev
See the README.md for more context about this project.

TODO: I configure nginx to serve static files from /var/www/learn. I'd like to
symlink /var/www/learn to briefcase/learn as part of my `rebuild` script, but I
don't currently.
2020-03-08 11:43:33 +00:00
William Carroll
843e37b04f Ignore fish/{config.fish,fish_variables}
- config.fish: home-manager generates this file for me.
- fish_variables: fish generates this file.
2020-03-07 23:03:39 +00:00
William Carroll
94c0081241 Temporarily disable docker and rust from .profile
Attempting to debug nginx.
2020-03-07 16:17:23 +00:00
William Carroll
c187d89f27 Rename socrates/default.nix -> socrates/configuration.nix
readTree uses the output attribute set of default.nix as the value for
nixos.socrates, which disables me from resolving nixos.socrates.rebuild since
there is no rebuild attribute in the output attribute set from default.nix.

If I rename default.nix -> configuration.nix, I can resolve
nixos.socrates.{configuration,hardware,rebuild}.
2020-03-07 16:17:23 +00:00
William Carroll
694ca4a85f Ensure socrates/default.nix is a function
Nix complains that `nixos.socrates` is not a function but a set. By adding
`{ ... }:` to the top of the file, I'm hoping to change it from a set to a
function.
2020-03-07 16:17:23 +00:00
William Carroll
5ba3f2b572 Attempt to serve {learn,blog}.wpcarro.dev
Reading an Nginx tutorial and trying to port the information over to NixOS.
2020-03-07 16:17:22 +00:00
William Carroll
431b4980e4 Remove fix-point recursion from socrates/default.nix
The fixed-point recursion isn't necessary.
2020-03-07 15:07:32 +00:00
Abseil Team
40a0e58eb3 Export of internal Abseil changes
--
e6e6dacbde7e4f997e5c29f27c96f86d48e8d5d9 by Abseil Team <absl-team@google.com>:

Minor typo fix.

PiperOrigin-RevId: 299155812
GitOrigin-RevId: e6e6dacbde7e4f997e5c29f27c96f86d48e8d5d9
Change-Id: I900afc4fe7355e0b081588351160dbd600c84729
2020-03-06 15:14:07 -05:00
William Carroll
b04b1dafd2 Implement an in-place shuffling algorithm
I believe this may be the Fisher-Yates shuffle, but I'm not sure.
2020-03-06 18:45:55 +00:00
William Carroll
a9ac4f925b Support root directory and dirs like /tmp
Properly handle display the root directory and sub directories.
2020-03-06 18:45:55 +00:00
William Carroll
5d656b646f Include notmuch as an Emacs dependency
`(require 'notmuch)` in `email.el` broke my Emacs initialization. This should
fix that.
2020-03-06 18:45:55 +00:00
William Carroll
28af585f3d Include NIX_PATH settings in nix/rebuild-emacs function
I'm currently setting NIX_PATH in ~/briefcase/shell.nix. This means when I call
`nix/rebuild-emacs` from a buffer that is inside the briefcase directory, the
command succeeds because NIX_PATH is properly defined. When I call
`nix/rebuild-emacs` from any other location it fails.

I'm hard-coding the NIX_PATH in this command so that I can call
`nix/rebuild-emacs` from any buffer that is currently active.
2020-03-06 18:45:55 +00:00
William Carroll
96ff26e5ca Support nix/home-manager-switch
As a part of my plan to reduce my dependence on the shell, I defined an Elisp
function to call `home-manager switch` from `M-x`.
2020-03-06 18:45:55 +00:00
William Carroll
2eb9259a1b Manage fish with home-manager
I patched home-manager locally to support fzf keybindings for fish. I will PR
this into home-manager, but I haven't yet, which means that my home.nix file
depends on my local ~/home-manager.
2020-03-06 18:45:55 +00:00
William Carroll
fe61dee511 Splice configs/shared directory
- Move all children from configs/shared into configs.
- Delete "shared" directory.
2020-03-06 10:15:29 +00:00
William Carroll
137bd6dc0c Drop support for terminator
I've been consistently using vterm enough that I don't think I will change
shells anytime soon. Couple this with my previous commit where I hint that I'd
like to curb all terminal usage if possible, and it seems unlikely that I'll
want to keep this terminator configuration.
2020-03-06 10:15:29 +00:00
William Carroll
382ef0be55 Drop support for rofi
Rofi is a nicer alternative to dmenu, but I use neither dmenu nor rofi, so
farewell.
2020-03-06 10:15:29 +00:00
William Carroll
fd0595805f Drop support for mpd
If I'm being candid, I'm not even sure I remember what mpd does. My current
guess is that it's a music player daemon.
2020-03-06 10:15:29 +00:00
William Carroll
e31e8d7dcc Drop support for lf
While I like lf, I don't use it enough to maintain this configuration.
2020-03-06 10:15:29 +00:00
William Carroll
86850e9c61 Drop support for .g4d
I have an Elisp module that encodes these aliases mappings.
2020-03-06 10:15:29 +00:00
William Carroll
813c7f94de Drop support for desktop and laptop
As I pruned increasingly more dependencies, the few dependencies that desktop
and laptop hosted were too trivial for me to justify supporting. And so, I no
longer support them.
2020-03-06 10:15:29 +00:00
William Carroll
f2d9af2745 Support gpg-agent with home-manager
A previous commit supported gpg.conf; this commit supports gpg-agent.conf. I
still have other files in my .gnupg directory that I should audit.
2020-03-06 10:15:29 +00:00