Skip to content

Instantly share code, notes, and snippets.

View pushcx's full-sized avatar

Peter Bhat Harkins pushcx

View GitHub Profile
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
@pushcx
pushcx / log.txt
Last active May 26, 2021 03:10
freenode takeover of #lobsters
2021-05-26 03:05:20 --> freenodecom (~com@freenode/staff) has joined #lobsters
2021-05-26 03:05:20 -- Mode #lobsters [+o freenodecom] by OperServ
2021-05-26 03:05:20 -- Mode #lobsters [+o freenodecom] by freenodecom
2021-05-26 03:05:20 -- freenodecom has changed topic for #lobsters from "Lobsters chat is #lobsters on irc.libera.chat - more info: https://lobste.rs/s/1z77ly/libera_chat" to "This channel has moved to ##lobsters. The topic is in violation of freenode policy: https://freenode.net/policies"
2021-05-26 03:05:20 @freenodecom This channel has been reopened with respect to the communities and new users. The topic is in violation of freenode policy: https://freenode.net/policies
2021-05-26 03:05:20 -- Mode #lobsters [-ov pushcx pushcx] by freenodecom
2021-05-26 03:05:20 -- Mode #lobsters [-sbbbb $a:Evolver *!krishdevd@111.223.27.196 *!*@78.193.195.38 *!*@177.192.231.135] by ChanServ
2021-05-26 03:05:20 -- Mode #lobsters [-bbbb *!*@177.
# old mariadb:
MariaDB [lobsters]> explain SELECT COUNT(*) FROM `replying_comments` WHERE `replying_comments`.`user_id` = 78 AND `replying_comments`.`is_unread` = TRUE;
+------+--------------------+-----------------+--------+--------------------------------------------------------------------------------------------+-------------------------------+---------+-------------------------------------------------------------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+------+--------------------+-----------------+--------+--------------------------------------------------------------------------------------------+-------------------------------+---------+-------------------------------------------------------------+------+-------------+
| 1 | PRIMARY |