Skip to content

Instantly share code, notes, and snippets.

@pushcx
pushcx / mostcomments.sql
Created September 5, 2024 19:30
most comments
MariaDB [lobsters]> SELECT short_id, title, comments_count FROM stories ORDER BY comments_count DESC LIMIT 100;
+----------+-----------------------------------------------------------------------------------------------------------------+----------------+
| short_id | title | comments_count |
+----------+-----------------------------------------------------------------------------------------------------------------+----------------+
| h9xgpv | Rate my Homepage | 496 |
| uihyvs | backdoor in upstream xz/liblzma leading to ssh server compromise | 306 |
| zp4ofg | Lobster burntsushi has left the site, algorithm detecting standing might be off | 280 |
| 8aiw6g | What software do you dream about, b
@pushcx
pushcx / log.txt
Created June 21, 2024 15:15
lobsters oom kill
Jun 21 12:56:56 lobste.rs puma[2445540]: [2445540] + Gemfile in context: /srv/lobste.rs/http/Gemfile
Jun 21 12:57:17 lobste.rs puma[2445540]: W, [2024-06-21T12:57:17.797831 #2445540] WARN -- : heinous_inline_partial initialized, found: {"app/views/comments/_threads.html.erb"=>"app/views/comments/_comment.html.e>
Jun 21 12:57:21 lobste.rs puma[2364866]: [2364866] - Worker 14 (PID: 2445540) booted in 24.79s, phase: 0
Jun 21 14:53:14 lobste.rs systemd[1]: lobsters-puma.service: A process of this unit has been killed by the OOM killer.
░░ Subject: A process of lobsters-puma.service unit has been killed by the OOM killer.
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A process of unit @UNIT has been killed by the Linux kernel out-of-memory (OOM)
░░ killer logic. This usually indicates that the system is low on memory and that
MariaDB [lobsters]> select short_id, title, reason from stories s join moderations m on s.id = m.story_id where m.comment_id is null and s.is_moderated = true and (m.reason like '% torch %' or m.reason like '% customer %');
+----------+---------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
| short_id | title | reason |
+----------+---------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
| xoi5nv | Netlify Billi
" a dark, mostly grayscale colorscheme with judicious use of bold and italic
"
" based on jcs's eponymous colorscheme, mostly changing standout/reverse to italic
"
" TODO: support for background switching at bottom
hi clear
if exists("syntax_on")
syntax reset
endif
@pushcx
pushcx / results.txt
Created June 7, 2023 13:24
stories with ‘clickbait’ in mod log
short_id score (select count(*) from comments where story_id = stories.id) title
hmyyz2 6 23 Limited Success Generating a Binary Search
glqqyp 13 6 Python's Missing Batteries: More Libraries
kkfept 30 54 One decade later, I’m still mad at GNOME
i1rbqo 11 6 Qualcomm Phone Chips Send Telemtry
6f72pf 17 2 Hyena may scale better than GPT
lo3ise 18 3 Jailbreaking a Dreametech Z10 Pro vacuum
l2fn3c 29 3 Discovering one bug after another in the UTF-8 decoding logic in OpenBSD
6gmzkr 43 46 Against Github
gc5ndw 75 31 Digital Ocean has shut down two technical sites
@pushcx
pushcx / 1.txt
Last active May 17, 2023 17:38
2023-05-17 lobsters domain query
domain
undeadly.org
paulrouget.com
techblog.netflix.com
queue.acm.org
blog.golang.org
commandcenter.blogspot.com
lkml.org
idealab.talkingpointsmemo.com
aws.amazon.com
@pushcx
pushcx / archupdate
Created July 24, 2022 15:22
~/.bin/archupdate
#!/usr/bin/env bash
# aura -C pkg -- to downgrade a package
# aura -Li pkg -- to print install/update log
# aura -Pa -- to audit PKGBUILDs (slow, s)
# aura -Qo file -- what package owns file
# aura -Ql pkg -- what files are in package
set -e # exit on error
set -o xtrace # print commands
$ git log --all --grep='merged'
24fa1e6a fix authored tag on merged story 1 year, 8 months ago, Peter Bhat Harkins
7a59fd95 1 + n on story domain for merged stories 1 year, 9 months ago, Peter Bhat Harkins
1a34c6ee Fix bug allowing users to vote on, hide or save merged stories. (#739) (#748) 2 years, 5 months ago, 4io
db3d6453 fix 1 + n on merged stories, even if ugly to do from a view 2 years, 7 months ago, Peter Bhat Harkins
bd1a3033 (pmueller/master) Redirect json requests for a merged story's show page (#710) 2 years, 7 months ago, Preston Mueller
13797ad1 Fix #706, properly redirect json requests for a merged story's show page 2 years, 7 months ago, Preston Mueller
6bf4a9fb fix BelongsTo rubocop warnings 2 years, 9 months ago, Thomas Dziedzic
0d7806b6 update comment count when merged into a story 2 years, 9 months ago, Preston Mueller
8a885abe (pmueller-count) Fix #683, run callbacks when updating a story's comments count, so any merged_into_story will also update. 2 years, 9 months ago
> explain SELECT `replying_comments`.* FROM `replying_comments` WHERE `replying_comments`.`user_id` = 0 ORDER BY `replying_comments`.`comment_created_at` DESC LIMIT 25 OFFSET 0;
+---+---+---+---+---+---+---+---+---+---+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+---+---+---+---+---+---+---+---+---+---+
| 1 | SIMPLE | com | index | pageid | pageid | 767 | NULL | 130624 | Using index; Using temporary; Using filesort |
| 1 | SIMPLE | a | eq_ref | PRIMARY,idx_section,idx_state,idx_catid | PRIMARY | 4 | faktyp_dd.com.pageid | 1 | Using index condition; Using where |
| 1 | SIMPLE | f | eq_ref | PRIMARY | PRIMARY | 4 | faktyp_dd.a.id | 1 | Using where; Using index |
| 1 | SIMPLE | cc | eq_ref | PRIMARY | PRIMARY | 4 | faktyp_dd.a.catid | 1 | Using index condition; Using where |
| 1 | SIMPLE | c | eq_ref | PRIMARY | PRIMARY | 4 | faktyp_dd.f.content_id | 1 | Using index condition; Using where |
| 1 | SIMPLE | s | eq_ref | PRIMARY | PRIMARY | 4 | faktyp_dd.a.sectionid | 1
@pushcx
pushcx / draft.md
Created January 22, 2022 16:00
draft for next quarterly job posting

Happy new year!

Here's the template. If you have multiple positions, please post them in a single comment with --- between:

**Company:** [Name](https://example.com)

**Position(s):** Title

**Location:** City, State/Province, Country - ONSITE or REMOTE