Skip to content

Instantly share code, notes, and snippets.

Avatar

Jon Ericson jericson

View GitHub Profile
@jericson
jericson / new_pc.md
Last active May 14, 2021
My instructions for setting up a new PC
View new_pc.md
  1. Turn on Bluetooth => Settings => Devices => Bluetooth
  2. Connect mouse and keyboard via Bluetooth.
  3. Download Power Toys => https://github.com/microsoft/PowerToys/releases/
  4. Remap keys: Win (Left) => Alt (Left); Alt (Left) => Ctrl (Left); Caps Lock => Win (Left)
  5. Fix trackpad scroll => Setting => Devices => Touchpad => Scrolling direction => Down motion scrolls down
  6. Install Dropbox => https://www.dropbox.com/install
  7. Install 1Password 4 => https://1password.com/downloads/windows/
  8. Install Linux => https://docs.microsoft.com/en-us/windows/wsl/install-win10#simplified-installation-for-windows-insiders
  9. Install Emacs => https://github.com/hubisan/emacs-wsl
  10. Show hidden folders => File Explorer => View => Hidden items
View psalm-40-70.md
Psalm 40:13-17 Psalm 70
For the music director, a psalm of David. For the music director, by David; written to get God’s attention.
Please be willing, O LORD, to rescue me! O God, please be willing to rescue me.
O LORD, hurry and help me! O LORD, hurry and help me.
May those who are trying to snatch away my life May those who are trying to take my life
be totally embarrassed and ashamed. be embarrassed and ashamed.
May those who want to harm me May those who want to harm me
be turned back and ashamed. be turned back and ashamed.
May those who say to me, “Aha! Aha!” May those who say, “Aha! Aha!”
View psalm-14-53.md
Psalm 14 Psalm 53
For the music director, by David. For the music director, according to the machalath style; a well-written song by David.
Fools say to themselves, “There is no God.” Fools say to themselves, “There is no God.”
They sin and commit evil deeds; They sin and commit evil deeds;
none of them does what is right. none of them does what is right.
The LORD looks down from heaven at the human race, God looks down from heaven at the human race,
to see if there is anyone who is wise and seeks God. to see if there is anyone who is wise and seeks God.
Everyone rejects God; Everyone rejects God;
they are all morally corrupt. they are all morally corrupt.
@jericson
jericson / trilogy_question.md
Created Aug 9, 2018
How might I get detailed database error messages from dbplyr::tbl?
View trilogy_question.md

I'm using R to plot some data I pull out of a database (the Stack Exchange data dump, to be specific):

dplyr::tbl(serverfault, 
           dbplyr::sql("
select year(p.CreationDate) year,
       avg(p.AnswerCount*1.0) answers_per_question,
       sum(iif(ClosedDate is null, 0.0, 100.0))/count(*) close_rate
from Posts p
where PostTypeId = 1
group by year(p.CreationDate)
@jericson
jericson / new_mac.md
Last active Jun 12, 2021
My instructions for setting up a new Mac
View new_mac.md
  1. Settings => Mouse => uncheck “Scroll direction: Natural” (Whatever, jerks.)
  2. Settings => Trackpad => Secondary click => Click in bottom right corner
  3. Settings => Keyboard => check “Use F1, F2, etc. keys as standard function keys” (No longer necessary?)
  4. Settings => Keyboard => Modifier Keys… => Caps Lock to Control [Repeat for each keyboard] (Uuuuuuugh)
  5. Settings => Keyboard => Touch Bar shows => F1, F2, etc. Keys [For MacBook Pros with the Touch Bar]
  6. Settings => Sound => Output => Headset
  7. Settings => Sound => Input => Headset
  8. Settings => Date & Time => Clock => check Use a 24-hour clock and Show date
  9. Dock => right click [icon] => [skip for Siri] Options => “Remove from Dock” [Repeat for each unused application]
  10. Safari => Chrome => Download Now
@jericson
jericson / IDVB_comments.csv
Last active Sep 1, 2017
All idownvotedbecau.se comments on Stack Overflow.
View IDVB_comments.csv
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 9.
PostId,Text,Score,CreationDate,DeletionDate
"13519990","I made -49th downvote because: [there was no effort to debug the code](http://idownvotedbecau.se/nodebugging/)","","2017-08-01 16:38:15",""
"45028733","idownvotedbecau.se/noexceptiondetail (I didn't downvote, but still read that as it describes how to get the details of the exception and why it's important to do so)","1","2017-07-11 15:52:54",""
"46006398","http://idownvotedbecau.se/nocode/","1","2017-09-01 18:56:45",""
"44762214","idownvotedbecau.se/noexceptiondetails (well, not enough exception details)","","2017-06-26 14:40:47",""
"45765175","http://idownvotedbecau.se/nocode/","","2017-08-18 21:21:40",""
"45777673","Welcome to Stack Overflow! [I downvoted because no MCVE](http://idownvotedbecau.se/nomcve/). Please post a [minimal verifiable example](//stackoverflow.com/help/mcve), of your problem.","","2017-08-20 01:31:27",""
"45439770","http://idownvotedbecau.se/itsnotworking/","2","2017-08-01 13:53:25",""
"45441543","downvoted because: [there was no
@jericson
jericson / docs_pivot.md
Last active May 17, 2017
Tearing Down the Structure of Documentation
View docs_pivot.md

Since early on in the private beta of Documentation, we’ve used a simple, rigid structure:

Tags => Topics => Examples + optional sections

At the time, users wondered if this was the right structure. Since Documentation is a grand experiment, I figured we’d wait to see how the structure gets used and adjust as needed. But rather than being a step in the right direction, tags and topics were just getting in the way. We didn’t address the problem partially because we focused on other broken features and partially because we hoped the current system would pan out. At long last, we’ve got the message: fundamentally the structure we provided isn’t working. This isn’t something we can address by tweaking a few features; it’s the foundation of the entire product. Let’s work together to find a way of organizing Documentation that’s better than what we have now and, perhaps, revolutionizes the entire gen

@jericson
jericson / Dsafds_draft.md
Created Sep 30, 2016
Dsafds' discarded draft (C++: Copying vs Assignment)
View Dsafds_draft.md

Copying vs Assignment

Assignment Constructor

The Assignment Operator is when you replace the data with an already existing(previously initialized) object with some other object's data. Lets take this as an example:

// Assignment Operator
#include <iostream>
#include <string>
@jericson
jericson / deep_web.md
Created Jun 8, 2016
What exactly is the Deep Web?
View deep_web.md
@jericson
jericson / mod_vac_requests.md
Last active Jul 26, 2016
Moderator Vacation feature requests
View mod_vac_requests.md

Completed

  • Add date/reason for absence to the mod page instead of being in the title attribute.
  • Network vacations for mods with more than one site.
  • Send notifications to community@ automatically.
  • Status on meta should inherit from main.

Declined

  • Begin and end dates for pre-planned absenses. [Unfortunately, because of the way moderator vacation was been implemented, this was not easy this time around.]