Barack Roll

The political videos are getting better every day. This is too good not to share.

FYI–Blogged this directly from Youtube–took 4 days to show up. Last time I do that.

 

logo_wp.

Long ago, when I was slightly younger, in better shape, and maybe even better looking, I threw together a little wordpress plugin that made it a bit easier to add a Lijit Widget to a wordpress blog. Not long after that, I scored a job at Lijit and became so busy I never updated it or even really looked at it again. Until now…

Please ignore the melodramatic paragraph above. The truth is, we decided to get someone with some more wordpress plugin experience to help us out. We enlisted the help of Alex King and the great team at CrowdFavorite to help us create a new wordpress plugin that has more features, and is better integrated with the WordPress platform. The result is a great looking plugin that makes it easy to add Lijit to your wordpress blog,

Whats new:

  • Use your existing account, or create a new account from within the plugin admin menu
  • Choose between the classic sidebar widget, or hijack the wordpress search widget.
  • See your Lijit statistics from your wordpress dashboard.
  • Tighter plugin and admin menu integration

Where to get it:

Goto http://wordpress.org/extend/plugins/wp-lijit-wijit  to download the plugin and read the install instructions.

Need help or have questions?  Send an email to support@lijit.com .

 

disqus-logo

After experimenting with Disqus a few months back, I decided that the best bet for my 25 blog comments was to keep them in WordPress and out of the “cloud”. I think Disqus changed my mind today. They just released a new wordpress plugin that gives you the best of both worlds.

It allows you to keep your comments on your site, which adds extra “hit points” to your SEO , but it also means that comments may actually come up in search results. This is huge since I work for a company that does stuff on the internet that has something to do with search. The new changes, and ease of install make using Disqus as your primary comment manager a no-brainer.

Add a Lijit Widget into the mix, and you have everything a blogger could need. Plus, with easy Disqus/Lijit integration , your search experience gets even better.

Congrats to Daniel Ha, and the rest of the Disqus team.

 

128px-Apple-logo

File this one in the ridiculous category. I’ve waited for quite a while to do the Tiger – > Leopard upgrade on my Macbook. But the promise of easy backup with TimeMachine made me make the decision that this was the week to make “the switch” . So I get the install dvd and try to go through all of the steps of getting the install to work. That is when the fun begins. I tried multiple DVD’s, so I know it wasn’t the install media. Regular DVD’s and CD’s work fine, so it probably isn’t the drive.

Problems:

  1. DVD only boots 20% of the time..
  2. All install methods fail before they get going.
  3. DVD gets spit out 80% of the time.

Solution:

1. Turn the macbook on it’s side. Seriously. It has also been suggested that turning it upside down may do the trick.

IMG_3080 

Photo Courtesy of Tara’s sweet camera

Notice the gap near the back. Although precarious, it gave me enough room to leave the power attached. How stupid is that?

 

Paris Hilton finally displays some value to the human race.

See more funny videos at Funny or Die
 

Update: Looking for how to download files using Python3 and urllib? Check out my post here .

While checking out my great stats on Lijit recently, I started to see a pattern. I was able to determine that a large part of my Re-Search(search engine) traffic was coming from a post I did about reading and writing to files in Python back in  2005. In an effort to shamelessly attract more traffic on this topic, I have decided to flesh this post out a bit.

A common task that I run into both in my work life as well as my personal life, revolves around programmatically downloading content from the interwebs. This little code example will illustrate how to use urllib to download a file, and write/save the file contents locally. You may be saying to yourself “Self, can’t I do this in my favorite web browser??” . The answer is “YES”, but it’s a pain in the ass if you have more than 5 files you want to download.

Assume there are a set of images on your favorite website, and they are all named  image1.jpg,image2.jpg,image3.jpg, etc. Now imagine there are 50 images using this naming convention.How do you download them all using python , without struggling to do it one image at a time in your browser? Look below!

python

# Let's create a function that downloads a file, and saves it locally.
# This function accepts a file name, a read/write mode(binary or text),
# and the base url.

def stealStuff(file_name,file_mode,base_url):
	from urllib2 import Request, urlopen, URLError, HTTPError

	#create the url and the request
	url = base_url + file_name
	req = Request(url)

	# Open the url
	try:
		f = urlopen(req)
		print "downloading " + url

		# Open our local file for writing
		local_file = open(file_name, "w" + file_mode)
		#Write to our local file
		local_file.write(f.read())
		local_file.close()

	#handle errors
	except HTTPError, e:
		print "HTTP Error:",e.code , url
	except URLError, e:
		print "URL Error:",e.reason , url

# Set the range of images to 1-50.It says 51 because the
# range function never gets to the endpoint.
image_range = range(1,51)

# Iterate over image range
for index in image_range:

	base_url = 'http://www.techniqal.com/'
	#create file name based on known pattern
	file_name =  str(index) + ".jpg"
	# Now download the image. If these were text files,
	# or other ascii types, just pass an empty string
	# for the second param ala stealStuff(file_name,'',base_url)
	stealStuff(file_name,"b",base_url)

That’s it. It not only reports on any errors it encountered while downloading, but think of all of the time you just saved… Really though, how important is your time to you if you’re reading this blog???

 
© 2012 techniQal support Suffusion theme by Sayontan Sinha