Sep 032014
 

With that migration to Markdown, the rest of my old posts are kinda gonna look like shit – or are they?

Introducing Plugin Organizer, which allows you to enable plugins per-post, or even based on a wildcard URL! It’s kinda hard/nonintuitive to figure out/set up, but this question kinda explains how to use it for the purpose I want to: http://wordpress.org/support/topic/per-slug-or-per-category.

Old posts showing up in the post list view (http://blog.samsandberg.com) will still show up with Markdown-specific formatting, but for post-specific pages (such as http://blog.samsandberg.com/2013/11/06/ten-things/), I added a Plugin Filter to match things like “http://blog.samsandberg.com/2013/” (and clicked Also Affect Children) so that all posts from the year 2013 match, and then disabled my new Markdown plugin for those matching posts. I did this for 2012-2013, and then did month-specific ones for January of 2014 until last month.

:whew:

Sep 032014
 

MarkDown Notes

With all this buzz around Markdown lately, I decided to migrate my blog so that I can write it in Markdown, since it’s way easier for me to write.

According to this:

http://en.support.wordpress.com/markdown/

wordpress.com websites have MarkDown support, and supposedly it’s via this plugin:

http://michelf.ca/projects/php-markdown/extra/

testing this

so

that’s what’s up

Aug 042014
 

After this morning’s .nyc landgrab, I was curious to check in with the status of .pizza, for my eventual takeover of http://sam.pizza (not a thing yet, sadly)

Some references for those of you looking into the new gTLD ish:

Happy domain naming!

Jun 112014
 
Raspberry Pi Closeup

Raspberry Pi Closeup (Photo credit: GijsbertPeijs)

A quick one for this morning…

I’m sitting here, have my Raspberry Pi plugged in with an internet dongle, trying to figure out where it lives on my network.

I could type:

$ ping 10.0.1.2

and wait…

$ ping 10.0.1.3

and wait…

$ ping 10.0.1.4

and wait…

or I could just type:

$ arp -a

arp ftw!

Jun 042014
 

If you saw Hilary Parker‘s awesome post Sunsets in Google Calendar using R and got all excited about it, but have no idea how to use R, fear not. This post will help you go the distance!

First, install R. I myself use MacPorts

Susnset statue of Liberty

Susnset statue of Liberty (Photo credit: Adorenomis)

, so I did:

$ sudo port install R

which took a while and had a lot of dependencies, but whatevs, it eventually worked…

Next, save Hilary’s createsunsetcal.R file somewhere on your computer.

Open that up and modify it to use your own sunset location and lat/lon coordinates (I used Google Maps and looked at the lat/lon coordinates in the URL to fill in the data I wanted). Save it.

Now, in that same folder, open an R prompt like so and do the following:

$ R

> install.packages(“StreamMetabolism”)

… (follow the prompts here, choose a mirror, etc.)

> library(StreamMetabolism)

> source(“/path/to/downloaded/file/createsunsetcal.R”)

> createsunsetcal()

then <control> + d to exit your R session.

Congrats, you should now see a file called sunset.csv, hooray!

Thanks for the awesome write-up Hilary.

Enhanced by Zemanta

May 302014
 
Django logo

Django logo (Photo credit: Wikipedia)

My finding for today is that you can set up auto-complete for when you start typing something like this in your Django project:

./manage.py function_

but don’t remember exactly what you called that custom manage.py command.

Just download this baby and source it from your .bashrc file:

https://raw.githubusercontent.com/django/django/master/extras/djangobashcompletion

And you’re off to the races!

Enhanced by Zemanta

May 072014
 

0 ANY MOMENT PREVIOUS TO THE PRESENT MOMENT

1 THE PRESENT MOMENT AND ONLY THE PRESENT MOMENT

2 ALL APARENTLY INDIVIDUAL OBJECTS DIRECTLY EXPERIENCED BY YOU AT 1

3 ALL OF YOUR RECOLLECTION AT 1 OF APPARENTLY INDIVIDUAL OBJECTS DIRECTLY EXPERIENCED BY YOU AT 0 AND KNOWN TO BE IDENTICAL WITH 2

4 ALL CRITERIA BY WHICH YOU MIGHT DISTINGUISH BETWEEN MEMBERS OF 3 AND 2

5 ALL OF YOUR EXTRAPOLATION FROM 2 AND 3 CONCERNING THE DISPOSITION OF 2 AT 0

6 ALL ASPECTS OF THE DISPOSITION OF YOUR WON BODY AT 1 WHICH YOU CONSIDER IN WHOLE OR IN PART STRUCTURALLY ANALOGOUS WITH THE DISPOSITION OF 2

7 ALL OF YOUR INTENTIONAL BODILY ACTS PERFORMED UPON ANY MEMBER OF 2

8 ALL OF YOUR BODILY SENSATIONS WHICH YOU CONSIDER CONTINGENT UPON YOUR BODILY CONTACT WITH ANY MEMBER OF 2

9 ALL EMOTIONS DIRECTLY EXPERIENCED BY YOU AT 1

10 ALL OF YOUR BODILY SENSATIONS WHICH YOU CONSIDER CONTINGENT UPON ANY MEMBER OF 9

11 ALL CRITERIA BY WHICH YOU MIGHT DISTINGUISH BETWEEN MEMBERS OF 10 AND 9

12 ALL OF YOUR RECOLLECTION AT 1 OTHER THAN 3

13 ALL ASPECTS OF 12 UPON WHICH YOU CONSIDER ANY MEMBER OF 9 TO BE CONTINGENT

via http://majicalcloudz.com/victor-burgin-any-moment-1970/

May 012014
 

Introducing… MULTIPLAYER 2048!

http://multiplayer-2048.herokuapp.com

That fun game that just won’t die is back again, this time in multiplayer form!

To play along, join the #2048 channel on Freenode and start issuing commands like “up”/”down”/”left”/”right” (or “u”/”d”/”l”/”r” for short).

From a technical perspective, I forked the original version and modified the controls so that they no longer come from the keyboard. This multiplayer version instead uses Pusher to update clients with realtime events and a Hubot with an IRC adapter and a custom script that calls a Python/Flask webserver, stores the data in a Redis list, and triggers the Pusher updates.

I was on the front page of Hacker News for about five minutes before being booted (still learning the ropes on how HN posting works), so I guess it wasn’t a big hit. I was even in touch with the kind folks over at Pusher who bumped me up to a higher number of allowed simultaneous connections to prepare for HN traffic, but alas I never needed it. Thanks anyway Pusherinos!

Happy 2048ing!

Enhanced by Zemanta