Skip to content

u/MrDubious

In this archive from Nov 2009 to May 2026

54
posts
422
comments
9
media
1.4k
score
2 saved before deletion

The thousand dollars in ten envelopes puzzle.

I don't generally do a lot of math handling in the PHP I write, so I had a little fun today with an online dev group proving the solution to the Thousand Dollars in Ten Envelopes puzzle using PHP. My solution was as follows: function testnumber($arg){ $envelopes = array(1, 2, 4, 8, 16, 32, 64, 128,...

6 points9 comments
Open on Reddit

Does anyone know of a plugin or snippet capable of subscribing to a specific MailChimp list based on a specific product purchase in Woo?

OK, so I've got a drip campaign setup in MailChimp for product support, and need to only fire it off when a customer buys a specific product in WooCommerce. I've grabbed the most likely candidate for MailChimp integration, but it, like all of the options, is mostly focused on subscribing to a specif...

0 points6 comments
Open on Reddit

Adding G+ Commenting to WordPress

OK, I thought about making a blog post about it, but fuck it, the method is short enough I can just put it here as a text post: Replace your default commenting code in your comments.php with the following: <script src="https://apis.google.com/js/plusone.js"> </script> <div class="g-comments" data-hr...

18 points22 comments
Open on Reddit

Sonderous Wanderer

Ain't it grand the places I've been? Been seen as a glimpse of movement, cast a shadow, played extra to all of your life's moments, nothing more than a blur Ain't it grand all the lives I've hitchhiked just by being there, a stranger passing, a flash of hair and a smile at the checkout, one of a mil...

6 points2 comments
Open on Reddit

Plugin Development Questions

I use WP Online Store a lot (because I like OS Commerce, and this is the best solution I've found to integrate both). However, one of the issues with the plugin is that the data only lives inside the "page" that it's called on, which means little product integration with the rest of the site. I'm cr...

4 points7 comments
Open on Reddit

Free verse: Inhuman (NSFW Language)

When did compassion fall out of fashion? Cops bashing women in the face with night sticks, while remotes click to the next channel, cuz fuck it, Kutcher's on 2 1/2 Men (and so's your wife). When did ignorance become the hot new style, miles of mindless eyes glazed over like donuts, no guts or glory,...

3 points0 comments
Open on Reddit

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.