Daniel Veazey
  • Home
  • About
  • Contact
  • What People Are Saying
Follow

Monthly archives for February, 2012

Changing stuff in Geany

Feb29
2012
2 Comments Written by Daniel Veazey

Geany logoI use Geany for my IDE. It’s pretty good for what I do. I’m no hardcore coder. I just use Python for experimenting and learning.

It had been a little while since I did anything with Python. In fact, the last time I used it was before I installed Arch. I got a little bit of coding fever and wanted to refresh my memory. I was thinking about rewriting my Sudoku solver program, using functions instead of the hot mess that I left it in a few months ago.

But I was running into a little problem. When I would press F5 to run my program, the terminal that popped up gave me this error message:

./geany_run_script.sh: line 5: python: command not found

------------------
(program exited with code: 127)
Press return to continue

“Well that’s no good,” I thought. It turns out that Geany was trying to run Python with the command “python,” which would be fine if “python” were the command it needed to run. But since I am using Arch, “python” is for the bleeding edge Python 3, whereas the more commonly used Python 2.7 is called with “python2.” Since I didn’t want to use Python 3 and didn’t have it installed, I needed to change the command to “python2″ so Geany wouldn’t give me these error messages anymore. Sure, I could just save the program and then open a terminal and type “python2 filename.py,” but that wouldn’t be a good solution because it would be a hassle.

I checked every preference menu I could find in Geany, but I couldn’t find a setting to change what it pointed to for running Python (or any other) programs. Then I looked all over the place for geany_run_script.sh, but I couldn’t find it anywhere, either. I did, however find some configuration files in /usr/share/geany. Particularly, I found /usr/share/geany/filetypes.python. That directory also had filetypes for all the languages that Geany supports. At the very end of filetypes.python were these lines:

[build_settings]
# %f will be replaced by the complete filename
# %e will be replaced by the filename without extension
# (use only one of it at one time)
compiler=python -m py_compile "%f"
run_cmd=python "%f"

Changing that last line took care of the problem:

run_cmd=python2 "%f"

So Geany stopped giving me error messages when I tried to run my Python programs and I was happy.

I still have a long way to go on rewriting my Sudoku solver, but I will post it here when it is updated. Keep an eye out.

Posted in Linux, Python - Tagged arch linux, geany, sudoku

Yurbuds customer service is great

Feb18
2012
Leave a Comment Written by Daniel Veazey

Yurbuds Inspire Pro earbudsI recently gave an unfavorable review of the yurbuds inspire pro earbuds. In response, I got a comment from yurbuds apologizing for my bad experience with their product, and they wanted me to call them to resolve my problems with them. Kudos to them for that. Perhaps I was harsh in my review. Your experience with these earbuds might be much more positive than mine, so you should decide for yourself. I have heard several people say good things about yurbuds, and someone even told me that yurbuds were the best earbuds she ever bought. I should have put that in my review, and I sincerely apologize for not giving a more balanced point of view.

Posted in Activities, Music

Integrating Facebook comments with your WordPress site

Feb17
2012
Leave a Comment Written by Daniel Veazey

Facebook logoOne of the changes I’ve made to my blog is adding the ability to leave comments using a Facebook account. There are a couple of advantages to commenting this way. First, the reader doesn’t have to type in their name and email address in the WordPress comments, so that makes it a little bit easier for the reader and therefore a little more likely that he or she will leave a comment. Second, when the reader leaves a comment, should he or she leave the “Post to Facebook” option checked, it gives your website more publicity because it shows up in their news feed and all their Facebook friends have an opportunity to see it.

Now I’m going to show you how to add this feature to your WordPress site.

First go to developers.facebook.com/apps and click the Create New App button. Give this app a name, and ignore the App Namespace field. I named mine “danielveazey.com comments.” Click the checkbox saying that you agree with their platform policies, then click Continue. Type in the Captcha words to prove you’re not a spambot. Then you’re presented with a bunch of mumbo jumbo about App ID and API keys and whatnot.

Now go to developers.facebook.com/docs/reference/plugins/comments/. You should see this:

Facebook comments dialogPut your website’s URL in the first field (you’ll be changing this later in the code, but don’t worry about that now). Set number of posts to how many comments you want displayed by default (I left mine at 2). Set the width to a number of pixels that fits your theme well. For mine, I made it 773, and that goes all the way across the main content area of my single posts. You can choose the light or dark color scheme, then click Get Code.

Now you’re going to get your hands a little dirty. Leave that code there and open a new tab on your browser. You need to get into two files in your WordPress theme, header.php and comments.php. Make a backup copy of these files before you go mucking about in them. From your WordPress dashboard, go to Appearance → Editor. Over on the right, click on header.php. Copy all the code in the editor window and save it to a file on your computer so you can change it back if you mess up. Do the same for comments.php.

In header.php, look for the <body> tag. Right below that line, paste all the code from the first part of the pop-up code that Facebook gave you. Make sure it’s the HTML5 version (it should be by default). It’s at the top of the pop-up window. Now click Update File at the bottom of the editor. Here is an example of what that part of the file might look like:

<body <?php body_class(); ?>>
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=221223671306596";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

Now open up comments.php and find the line that reads “You can start editing here.” Paste the second piece of code from Facebook right below that line. You should see your website’s URL where it says data-href=”http://blahblahblah.” Where your URL is, you need to replace that with ”<?php the_permalink(); ?>” so the comments will appear correctly.

So the whole line looks like this:

<div class="fb-comments" data-href="<?php the_permalink(); ?>" data-num-posts="2" data-width="773" data-colorscheme="dark"></div>

Click Update File at the bottom of the editor and you’re done. Now the Facebook comments should show up just above where your WordPress comments appear.

If you found this post helpful, please leave a Facebook comment below, or a WordPress comment below that. Or both.

Posted in WordPress - Tagged comments, facebook, tutorial, wordpress

Yurbuds suck

Feb16
2012
2 Comments Written by Daniel Veazey

Yurbuds Inspire Pro earbudsUPDATE: Yurbuds has contacted me and wants to make sure I’m satisfied. Read all about it here.

I bought some earbuds so I can listen to music while I walk. I got the wrong ones. I bought the Yurbuds Inspire Pro, and they suck.

On their website, they make the claim:

Yurbuds are ergonomically designed to avoid nerve rich areas of the ear. Made with medical grade silicone, Yurbuds are ultra soft and comfortable for hours on end.

But it’s pure lies. These things hurt after wearing them for only a few minutes. The sound quality is average at best.

One of their gimmicks is their “twist lock technology” which is supposed to keep them from falling out. And that is something that actually seems to work, but the pain these earbuds cause makes me want them to fall out.

This is an overpriced, underperforming product. Don’t waste your money.

Posted in Activities, Music

Helping someone out

Feb15
2012
3 Comments Written by Daniel Veazey

Freedom Feens logoToday I was going through my feed reader and I saw a request for help from the Freedom Feens Podcast. They are asking people to upload episodes of the podcast to their YouTube channels. I don’t have to work until this afternoon, so I figured I’d upload a few episodes for them. Thing is, YouTube only accepts video uploads, not MP3s. So I have to render a video from the MP3 and a photo from Freedom Feens, which you can see here. The Freedom Feens are also the guys who put out the documentary Guns and Weed: The Road to Freedom, which I review here.

I installed kdenlive on my desktop computer (I had not installed it since I switched to Arch a few weeks ago), and it’s rendering the first video as I write this on my laptop. It is going kind of slow, though, and I’m not sure why. Usually a video with just a single image renders very quickly, but last I checked, kdenlive said it would take an hour and 15 minutes. No big deal, I guess.

It rained overnight. It’s supposed to be warmer today, with a continued chance of rain. I did some kettlebell exercises yesterday, and my back is a little bit tender today. If I get out and walk, I think it will loosen up.

Posted in Activities, Kdenlive, Linux

Personal stuff

Feb14
2012
Leave a Comment Written by Daniel Veazey

I’m thinking about taking this blog in a new direction and making it more personal. Here are some things I’ve been doing lately:

I’ve been on the Glycemic Load Diet since November 1. I have lost 34 lbs. The main concept of the Glycemic Load Diet is to only eat foods that don’t cause spikes in your blood glucose levels. Of course that means I have cut out a lot of carbohydrate. The main things I have cut out are bread, starchy foods like potatoes and rice, and sugary sodas. The foods I eat tend to be high in fat, and they tend to be pretty satisfying. I eat bacon and eggs for breakfast almost every day. I’m still not eating enough vegetables, but I do take vitamins and fiber supplements.

I’ve been exercising, too. I walk several times a week, and I have been using a 25 lb. kettlebell to do some exercises in the home. I have been doing some Turkish get-ups, goblet squats, kettlebell swings, push-ups and crunches. I have been tracking my exercise on fitocracy.com and runkeeper.com.

Why have I started this? A few reasons. I have lost a lot of self esteem over the years as I have gained weight. I want to live longer. I also am curious to see how much I can lose.

A few years ago, I was on Weight Watchers. I lost about 30 lbs. in just a few weeks. But then I plateaued and gave up.

This time I lost about 20 lbs in the first few weeks, and I plateaued again, but I didn’t stop. I kept eating food in the diet, and I kept up with the walking. The last 14 lbs have come off a lot slower than the first 20, but that’s fine. I kind of miss bread, but I’ve gotten used to not eating it very often. After a while, this diet becomes pretty natural and easier to stick to.

Posted in Activities

Installing packages from Arch User Repository

Feb09
2012
2 Comments Written by Daniel Veazey

I’ve been using Arch Linux for the past week or so. It’s pretty interesting, having to do everything for myself. Anyway, here is the basic way to install packages from the Arch User Repository. First, download the package from aur.archlinux.org. I downloaded Wolfenstein: Enemy Territory. Then you do this:

Code block   
[daniel@TimeMachine ~]$ cd builds
[daniel@TimeMachine builds]$ ls
enemy-territory.tar.gz  ld-lsb         ttf-ms-fonts.tar.gz
foo                     ld-lsb.tar.gz  ttf-win7-fonts
foo.tar.gz              ttf-ms-fonts   ttf-win7-fonts.tar.gz
[daniel@TimeMachine builds]$ tar -xvzf enemy-territory.tar.gz
enemy-territory
enemy-territory/enemy-territory.install
enemy-territory/enemy-territory.desktop
enemy-territory/PKGBUILD
enemy-territory/et-ded
enemy-territory/et.sh
enemy-territory/etded.sh
enemy-territory/et-pbupdate.sh
[daniel@TimeMachine builds]$ ls
enemy-territory         ld-lsb               ttf-win7-fonts
enemy-territory.tar.gz  ld-lsb.tar.gz        ttf-win7-fonts.tar.gz
foo                     ttf-ms-fonts
foo.tar.gz              ttf-ms-fonts.tar.gz
[daniel@TimeMachine builds]$ cd enemy-territory
[daniel@TimeMachine enemy-territory]$ ls
enemy-territory.desktop  et-ded    et-pbupdate.sh  PKGBUILD
enemy-territory.install  etded.sh  et.sh
[daniel@TimeMachine enemy-territory]$ makepkg -s
==> Making package: enemy-territory 2.60b-11 (Thu Feb  9 11:12:25 CST 2012)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving Sources...
  -> Downloading et-linux-2.60.x86.run...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  258M  100  258M    0     0   397k      0  0:11:06  0:11:06 --:--:--  324k
  -> Downloading ET-2.60b.zip...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 4046k  100 4046k    0     0   303k      0  0:00:13  0:00:13 --:--:--  370k
  -> Found enemy-territory.desktop
  -> Found et-ded
  -> Found et-pbupdate.sh
  -> Found et.sh
  -> Found etded.sh
==> Validating source files with md5sums...
    et-linux-2.60.x86.run ... Passed
    ET-2.60b.zip ... Passed
    enemy-territory.desktop ... Passed
    et-ded ... Passed
    et-pbupdate.sh ... Passed
    et.sh ... Passed
    etded.sh ... Passed
==> Extracting Sources...
  -> Extracting ET-2.60b.zip with bsdtar
==> Entering fakeroot environment...
==> Starting build()...
Creating directory enemy-territory
Verifying archive integrity... All good.
Uncompressing Enemy Territory 2.60 Full Install..............................................................................................................................................................................................................................................................................................................................
==> Tidying install...
  -> Purging unwanted files...
  -> Compressing man and info pages...
  -> Stripping unneeded symbols from binaries and libraries...
==> Creating package...
  -> Generating .PKGINFO file...
  -> Adding install file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: enemy-territory 2.60b-11 (Thu Feb  9 11:27:28 CST 2012)
[daniel@TimeMachine enemy-territory]$ ls
enemy-territory-2.60b-11-x86_64.pkg.tar.xz  et-ded                 et.sh
enemy-territory.desktop                     etded.sh               pkg
enemy-territory.install                     et-linux-2.60.x86.run  PKGBUILD
ET-2.60b.zip                                et-pbupdate.sh         src
[daniel@TimeMachine enemy-territory]$ sudo pacman -U enemy-territory-2.60b-11-x86_64.pkg.tar.xz
Password:
loading packages...
resolving dependencies...
looking for inter-conflicts...
 
Targets (1): enemy-territory-2.60b-11
 
Total Installed Size:   269.92 MiB
 
Proceed with installation? [Y/n]
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
(1/1) installing enemy-territory                   [######################] 100%
 
==> You have to run a working PunkBuster to play! Read here:
==> http://www.evenbalance.com/index.php?page=pbsetup.php
 
Optional dependencies for enemy-territory
    et-sdl-sound
[daniel@TimeMachine enemy-territory]$
Posted in Linux

Categories

  • Activities
  • Audacity
  • Books
  • Film reviews
  • Free stuff
  • Gadgetry
  • Gimp
  • Inkscape
  • Jokes
  • Kdenlive
  • Linux
  • Music
  • Photography
  • Python
  • Quotes
  • Ukulele
  • Videos
  • WordPress

Why you should leave a comment

1. I read all the comments.
2. I reply and answer every question.
3. I always click through to see the sites of commentators.
4. Because you can.
5. You become a participant instead of just an observer.

Pictures I took

DSC_0164 DSC_0174 Boxley Valley Barn DSC_0143 DSC_0141 DSC_0134 bee2 piper Geese DSC_0173 butterfly DSC_0168

Blogroll

  • A Life Ended Here
  • Arthur Reeder
  • Barrel House Marketing Group
  • Central Arkansas Innovative Alliance
  • Digital Photography School
  • Fazed
  • Freedom Feens Podcast
  • Full Circle Magazine
  • heathenx.org
  • John LeMasney
  • Libertarian Punk
  • Mitch Canter
  • Ozarks Unbound
  • radio free python
  • Ronnie Tucker
  • Tammy Hart Designs
  • The Agitator
  • Ubunite
  • Ubuntu
  • WordCamp Fayetteville
  • WP Beginner

EvoLve theme by Theme4Press  •  Powered by WordPress Daniel Veazey
Things I find interesting