Comments for 2718.us blog http://2718.us/blog Miscellaneous Technological Geekery Sun, 28 Feb 2010 01:51:21 +0000 hourly 1 http://wordpress.org/?v=3.0.4 Comment on Randomizing by Random-Comparison Sorting (Revisited) by 2718.us blog - The EU Browser Ballot and Random Sorting http://2718.us/blog/2010/02/24/randomizing-by-random-comparison-sorting-revisited/comment-page-1/#comment-277 2718.us blog - The EU Browser Ballot and Random Sorting Sun, 28 Feb 2010 01:51:21 +0000 http://2718.us/blog/?p=215#comment-277 [...] is highly dependent on the sorting algorithm used, though I cannot readily verify it [edit: I verified it].  Regardless, this seems to be a very poor way to generate a random ordering. Share and [...]

[...] is highly dependent on the sorting algorithm used, though I cannot readily verify it [edit: I verified it].  Regardless, this seems to be a very poor way to generate a random ordering. Share and [...]

]]>
Comment on The EU Browser Ballot and Random Sorting by 2718.us blog - Randomizing by Random-Comparison Sorting (Revisited) http://2718.us/blog/2010/02/23/the-eu-browser-ballot-and-random-sorting/comment-page-1/#comment-276 2718.us blog - Randomizing by Random-Comparison Sorting (Revisited) Wed, 24 Feb 2010 21:09:34 +0000 http://2718.us/blog/?p=212#comment-276 [...] I posted the results of my quick exploration of whether sorting the list {0,1,2,3,4} using a comparison function that randomly returns < or [...]

[...] I posted the results of my quick exploration of whether sorting the list {0,1,2,3,4} using a comparison function that randomly returns < or [...]

]]>
Comment on Unsticking the Mighty Mouse Scrollball by 2718.us blog - Apple Magic Mouse: First Hour Review http://2718.us/blog/2009/12/01/unsticking-the-mighty-mouse-scrollball/comment-page-1/#comment-242 2718.us blog - Apple Magic Mouse: First Hour Review Wed, 02 Dec 2009 02:53:06 +0000 http://2718.us/blog/?p=206#comment-242 [...] I did think it was solid enough to be worth buying, especially since I’ve been having to unstick the scrollball on my bluetooth Mighty Mouse just about weekly of late.  On about half a dozen occasions since [...]

[...] I did think it was solid enough to be worth buying, especially since I’ve been having to unstick the scrollball on my bluetooth Mighty Mouse just about weekly of late.  On about half a dozen occasions since [...]

]]>
Comment on Apache’s MultiViews Option by Michael Hampton http://2718.us/blog/2009/11/04/apaches-multiviews-option/comment-page-1/#comment-239 Michael Hampton Wed, 04 Nov 2009 18:34:30 +0000 http://2718.us/blog/?p=200#comment-239 MultiViews is indeed the right option. It's probably the only thing I'd actually like to see added to nginx at this point. So far I've had no trouble working around its absence, but it's just such a cool feature, and of course it's <a href="http://www.w3.org/Provider/Style/URI">something people <em>should</em> do</a>... MultiViews is indeed the right option. It’s probably the only thing I’d actually like to see added to nginx at this point. So far I’ve had no trouble working around its absence, but it’s just such a cool feature, and of course it’s something people should do

]]>
Comment on StartSSL: Free/Cheap SSL Certificates by 2718.us blog - Apache’s MultiViews Option http://2718.us/blog/2009/11/03/startssl-freecheap-ssl-certificates/comment-page-1/#comment-238 2718.us blog - Apache’s MultiViews Option Wed, 04 Nov 2009 15:58:34 +0000 http://2718.us/blog/?p=198#comment-238 [...] discovering free and cheap SSL certificates, I was playing with some sites over HTTPS to see what different browsers would show for the [...]

[...] discovering free and cheap SSL certificates, I was playing with some sites over HTTPS to see what different browsers would show for the [...]

]]>
Comment on 2718.us Blog: Now with OpenID by 2718.us blog - OpenID Works! http://2718.us/blog/2009/08/30/2718-us-blog-now-with-openid/comment-page-1/#comment-236 2718.us blog - OpenID Works! Tue, 20 Oct 2009 00:53:17 +0000 http://2718.us/blog/?p=167#comment-236 [...] weeks ago, I attempted to enable OpenID logins on this blog.  It didn’t work well.  It didn’t work at all.  Bad Behavior, which I consider [...]

[...] weeks ago, I attempted to enable OpenID logins on this blog.  It didn’t work well.  It didn’t work at all.  Bad Behavior, which I consider [...]

]]>
Comment on A List Apart Survey by Websites tagged "alistapart" on Postsaver http://2718.us/blog/2008/07/30/a-list-apart-survey/comment-page-1/#comment-188 Websites tagged "alistapart" on Postsaver Fri, 01 May 2009 05:17:18 +0000 http://2718.us/blog/?p=72#comment-188 [...] - A List Apart Survey saved by lrstille2009-04-26 - Space age saved by uiworker2009-04-25 - Top Websites To Learn CSS ( [...]

[...] – A List Apart Survey saved by lrstille2009-04-26 – Space age saved by uiworker2009-04-25 – Top Websites To Learn CSS ( [...]

]]>
Comment on AppleScript’s XML-RPC Doesn’t Get Along with UTF8 by 2718.us blog - XML-RPC and Mac Programming, Revisited http://2718.us/blog/2009/02/14/applescripts-xml-rpc-doesnt-get-along-with-utf8/comment-page-1/#comment-181 2718.us blog - XML-RPC and Mac Programming, Revisited Sun, 26 Apr 2009 05:59:06 +0000 http://2718.us/blog/?p=131#comment-181 [...] might have been wrong, or at least not entirely right, when I said that Applescript’s XML-RPC was doing something screwy with UTF8-encoded responses to XML-RPC reques....  I’m not sure if it’s LiveJournal (and other sites based on their code), or if [...]

[...] might have been wrong, or at least not entirely right, when I said that Applescript’s XML-RPC was doing something screwy with UTF8-encoded responses to XML-RPC reques….  I’m not sure if it’s LiveJournal (and other sites based on their code), or if [...]

]]>
Comment on Steps to “Unsling” the NSLU2 by Recent URLs tagged Nslu2 - Urlrecorder http://2718.us/blog/2008/07/13/steps-to-unsling-the-nslu2/comment-page-1/#comment-175 Recent URLs tagged Nslu2 - Urlrecorder Fri, 17 Apr 2009 22:31:15 +0000 http://2718.us/blog/?p=52#comment-175 [...] recorded first by Snoopy4eva01 on 2009-03-05→ Steps to “Unsling” the NSLU2 [...]

[...] recorded first by Snoopy4eva01 on 2009-03-05→ Steps to “Unsling” the NSLU2 [...]

]]>
Comment on Authenticating with WordPress 2.6 (part 3) by 2718.us http://2718.us/blog/2008/08/03/authenticating-with-wordpress-26-part-3/comment-page-1/#comment-134 2718.us Fri, 13 Mar 2009 16:38:32 +0000 http://2718.us/blog/?p=82#comment-134 @roberto What I've done where I tied into WP authentication is: <pre>require_once('/path/to/wp-config.php'); if (!is_user_logged_in()) auth_redirect(TRUE); $wp_user_record = wp_get_current_user(); $username = $wp_user_record->user_login;</pre> That is to say, I've done it by including WordPress's functions and calling wp_get_current_user() to get the user record and go from there. Given the username, there are certainly ways to go about extracting info from the database directly (which avoids the memory usage of loading up all of WP) and I think you can get the username from the cookies themselves (you'd have to have your scripts know about the WP cookie name stuff), but once you start tying into the system at that kind of lower level, the risk of major headaches on WP upgrades increases substantially. @roberto
What I’ve done where I tied into WP authentication is:

require_once('/path/to/wp-config.php');
if (!is_user_logged_in()) auth_redirect(TRUE);
$wp_user_record = wp_get_current_user();
$username = $wp_user_record->user_login;

That is to say, I’ve done it by including WordPress’s functions and calling wp_get_current_user() to get the user record and go from there.

Given the username, there are certainly ways to go about extracting info from the database directly (which avoids the memory usage of loading up all of WP) and I think you can get the username from the cookies themselves (you’d have to have your scripts know about the WP cookie name stuff), but once you start tying into the system at that kind of lower level, the risk of major headaches on WP upgrades increases substantially.

]]>