Skip to content

Instantly share code, notes, and snippets.

View jericson's full-sized avatar

Jon Ericson jericson

View GitHub Profile
@jericson
jericson / new_mac.md
Last active June 12, 2021 16:26
My instructions for setting up a new Mac
  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 / new_pc.md
Last active May 14, 2021 04:02
My instructions for setting up a new PC
  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
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.
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!”
@jericson
jericson / autoreviewcomments.user.js
Created March 9, 2012 17:02 — forked from Benjol/autoreviewcomments.user.js
Add pro-forma comments dialog for reviewing (pre-flag)
// ==UserScript==
// @name AutoReviewComments
// @namespace benjol
// @version 1.1.9
// @description Add pro-forma comments dialog for reviewing (pre-flag)
// @include http://*stackoverflow.com/questions*
// @include http://*stackoverflow.com/review*
// @include http://*stackoverflow.com/admin/dashboard*
// @include http://*serverfault.com/questions*
// @include http://*serverfault.com/review*
@jericson
jericson / documentation.md
Last active December 6, 2020 20:46
Text for introducing Stack Overflow Documentation

This is a book for learning more Perl. Neither a reference book nor a tutorial book, the Perl Cookbook serves as a companion book to both. It's for people who already know the basics but are wondering how to mix all those ingredients together into a complete program.—Tom Christiansen & Nathan Torkington, "Preface", Perl Cookbook

Asking on Stack Overflow is a bit like sitting at a sushi bar. If you respect the traditions, there is no better experience. Where else can you get a personalized answer to your programming question from a true master of the field? Unlike sushi, anyone with access to a search engine can sample Stack Overflow answers. What could be better?

Well, suppose someone is standing behind you at the bar and they grab some fish off your plate. After tasting it, they tell the chef, "Hey, could I get that with a bit more salt?"

@jericson
jericson / deep_web.md
Created June 8, 2016 17:06
What exactly is the Deep Web?
@jericson
jericson / trilogy_question.md
Created August 9, 2018 19:03
How might I get detailed database error messages from dbplyr::tbl?

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 / IDVB_comments.csv
Last active September 1, 2017 21:24
All idownvotedbecau.se comments on Stack Overflow.
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 22:25
Tearing Down the Structure of Documentation

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