- Install Windows Terminal
- Install VS Code
- Install WSL2
- Install Ubuntu
- Install Remote Development extension for VS Code
- Forward ports
- Develop
// ==UserScript== | |
// @name ChatGPT Hotkeys2 | |
// @namespace http://tampermonkey.net/ | |
// @version 2024-06-21 | |
// @description Add a few hotkeys to chatgpt.com | |
// @author You | |
// @match https://chatgpt.com/* | |
// @grant none | |
// ==/UserScript== |
objects = [ | |
# This is the higher version | |
{ name: "thing1", version: "5.15.6" }, | |
# but string comparison would think this one is | |
{ name: "thing2", version: "5.6.1" }, | |
] | |
objects.sort do |a, b| | |
# The comparison operator works as you'd expect on arrays of numbers | |
a_comps = a[:version].split(".").map(&:to_i) |
Recently, I started listening to the David Allen's audio book, "Getting Things Done: The Art of Stress-Free Productivity". In only a few chapters, this audio book has inspired me to completely revamp how I "get things done".
While I haven't heard the entire GTD system or even fully grasped everything I've heard, here are a few concepts that have already helped me become more productive at work and helped my family become more productive at home.
TLDR: always put actions, ideas, and reminders in a place that gets them out of your head but always in reach.
- Use verbose method names.
- Put the final result at the top of a piece of code instead of the bottom.
- Write like Example 3, not Example 1
Ever since reading a code snippet from an old colleague, I've strongly preferred a liberal amount of method calls to methods with verbose names. When others read my code, I want them to be able to quickly read a few method calls and understand what my the code should be doing from a very superficial level.
I frequently like to close programs by hovering over a group of windows, and middle clicking them closed.
The problem is, it takes something like a full second before the peek is shown, making the windows uncloseable for that time.
To remove this delay, add/edit the following registry DWORD (32-bit) value:
Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ExtendedUIHoverTime
To remove the delay, set it to 1
, not 0
(which seems to set it to the default of something like 1000 milliseconds).
Download Ruby Installer and DevKit
- Go to http://rubyinstaller.org/downloads/
- Download an install for ruby. For example, for 2.3.1, get rubyisntaller-2.3.1.exe
- Download the DevKit
1. Initialize
- Run the rubyinstaller.exe. It'll create a folder like C:\ruby23 for version 2.3.x
- Create a folder in that C:\ruby23 folder called "devkit", put the devkit.exe in there, and run it
I had a lot of trouble trying to get one of my Rails apps to accomplish this common task. For one thing, my dev box runs Windows 7, which notoriously does not play nicely with Ruby on Rails. Another thing... all the instructions/tutorials/document for the gem I'm using, Wicked PDF, were either incomplete or, for some reason or another, didn't work for me.
That's all to say, here are the steps I took, and I hope they will help someone.
I used the Wicked PDF gem. Ryan Bates over at RailsCasts goes over using PDFKit, but this writeup will be all about Wicked PDF.
These next steps I got straight from the instructions on the GitHub page: