Temporarily mount a Windows share in CentOS 6.4

December 2nd, 2013

If you just want to mount a Windows share quickly and easily on the command line, try this. You’ll need to install the cifs-utils package first. Depending on your system and the folder you are trying to use, you may also need to sudo this command.

mount -t cifs //servername/sharename /path/to/local/folder -o 'user=remoteuser,rw,uid=localusername,gid=localgroupname'

It will then ask you for the remote users password. The options are necessary to get read and write access as your local user.

So far, I’ve not managed to find a way to get anonymous access to Windows shares. This is good enough.

MagicMembers doesn’t let a user pay the site owner.

March 12th, 2013

Almost two hours into this problem, and I’m still no closer to figuring out what could be at fault.

The site is simple, one membership type protecting some videos using the built-in download provider. When it comes time to register, a user can put in their user name and e-mail then get redirected to a login page while they wait for their password via e-mail. After using their details, they are sent to back to the default WordPress login page with this error:

Your account is not active. To activate your account please complete the subscription payment.

“subscription payment” links to the transactions page and let the user start paying. Clicking on it sends you right back to a different login page (this one provided by Magic Members). Logging in just sends you back to the default WordPress login page with the same error.

All the test users (using the various payment types) that I’ve created in attempts to check the payment flow are sitting at Inactive.

On the off-chance that there is a stupid bug in version 1.8.11 (the version installed when this site was first created), I’m upgrading to 1.8.22 and hoping that it will fix the issue without breaking anything else.

The Update with the Facepalm

Turns out that it wasn’t MagicMembers problem at all – it was OptimisePress. Somewhere along the line, the transactions page had been set up as a WP Secured Membership page. That triggered the looping login problem.

Elm is full of “How Does That Work” moments

November 3rd, 2012

I came across Elm in Evan’s posts What is FRP? and Escape from Callback Hell. It’s a very interesting looking language.

Evan is positioning Elm as a replacement for javascript, HTML and CSS for web front end development. There is plenty of potential here but there is no easy path to go from the imperative concepts of javascript to the functional concepts of Elm. There is a little more confusion, since Elm is a library/framework/DSL/something of Haskell.

This is the state of things around version 0.5. By the time you read this, these concepts may better explained to confused imperators like myself.

It’s not all bad news. Simple use cases are quite readable. For instance, (inputField, tags) = Input.textField "Tag" is clearly assigning to two variables the results of calling the textField function in the Input namespace with a string constant.

The bad news comes when you start trying to make sense of more useful features. This is the function that creates a link in his website header.

button (name, href, clr) =
    let accent = color clr (spacer 100 2) in
    let butn = container 100 58 middle $ text . Text.color black $ toText name in
    Graphics.link href $ accent `below` butn

Don’t know about you, but looking at this, I get lost quickly.

Hopefully, the fact that button (name, href, clr) = defines the function we’re thinking about is obvious to you.

let ... in ... isn’t too bad. It creates a locally scoped variable that can be used in the inner expression.

When we get to the $ and the ., that’s when things get odd. It’s not clear from the documentation, but what these do is buried in Evan’s thesis describing the language. They are there to remove excessive brackets.

Instead of writing text(Text.color(black)) you write text . Text.color black. That’s a sensible idea but a matter of taste.

$ is a bit nuttier. It’s used to allow the result of a function to be used as a value in another function call. It’s needed because there are no commas separating the values in a function call. Javascript would use Graphics.link(href, below(accent, butn)).

`below` is kinda described on elm-lang.org. This is actually a pretty cool feature of Haskell for functions that have two arguments. It’s a good way of letting operators and functions read the same way.

The confusion here is just in the syntax elements. When you start considering how Signals work and how to use them, Evan is very good at explaining that. Hopefully, now you’ve read this, you can parse what the text means and then start comprehending the cool stuff.

Using jQuery and Facebook together

July 23rd, 2012

I wanted to give a big shout out to Jenny and Lih for their post on Loading Facebook Javascript SDK.

This fixed all the problems I was having trying to build a jQuery UI multiple friend selector widget.

For instance, I was in a weird situation where FB.api was undefined after the FB SDK was fully initialised and had updated things like fb:name tags and setAutoGrow.

It is also a vastly cleaner way to add the FB SDK in the jQuery era. It should be the default answer to the question “How do I load the javascript SDK?”.

Firefox, jQuery Lightbox and Facebook’s setAutoGrow don’t play nicely together

July 19th, 2012

This is related to trying to get rid of the scrollbars when doing an app in an iFrame. Firefox doesn’t size the iFrame in the same way as Chrome or IE, leaving the redundant scrollbars on the screen and taking up internal space.

After I set up jQuery Lightbox 0.5 and used it, the overlay box would cover up the entirety of the iFrame. Excellent, wonderful and all that good stuff. Checking it in Facebook looked OK, but wait, why is the lightbox image sliding down the screen?

The lightbox plugin sets the width and height of the overlay div on every resize event to the full height and width of the containing window. That full height and width goes to the edge on the outside of the scrollbars rather than the edge on the inside.

At some point later, setAutoGrow checks the size of the content and compares it to the area inside the scrollbars. If it’s bigger, then the window gets resized and the whole process starts again, eventually expanding the window to infinity.

The Simple Fix

Never use the full width and height of the window to set the size of a document-covering element, subtract 16px from both.

Keep Your Fan Page Posts in the Facebook News Feed With 3 Simple Steps

July 14th, 2012

About a month ago, I wrote about how Facebook Have Made A Major Public Mistake and How You Can Protect Yourself From The Fallout. That article is probably wrong – and won’t help you get your message out to Facebook fans.

This post is actually going to fix that. Here are your three simple steps to improving your reach and staying in the Facebook News Feed.

  1. Post something once a day.
  2. Post interesting content.
  3. Interact with your fans using @-tagging.

But First, a Public Service Announcement

The Show in News Feed setting is to help the user hide spammy pages or pages they still “like” but don’t want to read in their feed. Even if this is turned on, there is no guarantee that any particular user will see any particular post.

The problem lies in a lack of education on how to write for a fan page. Broadcasting doesn’t work anymore. You have to interact with your fans. That’s what these three steps are for.

Whenever you see someone claim that everybody should tick every Show In News Feed they have, correct them. Show them that you have followed these steps and you improved your reach.

Post Something Once a Day

It doesn’t matter what it is, a new photo, a funny story about what’s happening in your fan page’s world today or a shared picture. It only matters that you put something up there.

Try to post when your fans are most active. That way, they are more likely to actually see it before it falls off the bottom.

Keep up the discipline to do this, because it is the only way to prime the pump.

Post Interesting Content

Users that like or comment on your posts and shares are more likely to see the next one. Users that never like, comment or share your stuff become less and less likely to see anything you write —because you just aren’t engaging that individual.

Be like George Takei, he regularly posts new images that appeal to broad sections of his fan base. Every single one is an encouragement to hit the like, comment or share buttons. Every user that does that shows to their friends they have done it so their friends see the content and are more likely to click too. And so on, and so on, and so on.

You can’t always know what is interesting. If you are really stuck, pass on something new you like, a controversial news story relevant to your area or something from somebody else in a similar field.

Interact With Your Fans Using @-Tagging

Talk to your fans. When somebody comments, reply to them. Get a conversation going. The longer the conversation, the greater and greater the chance that that somebody and all their friends will see your posts.

When you are commenting as a fan page, you can type ‘@’ then start typing the name of somebody who has already replied to link them. They will get a notification encouraging them to come back and check you out again.

There You Go, Three Simple Steps

Go forth, follow the steps, and come back to leave comments on how your reach is improving over time.

Identity on the Federated Social Web

June 12th, 2012

Since my previous post on how we can move past Facebook, I’ve been thinking about how we as users can take control of what we publish.

DNS or something else?

About a year and a half ago, Dave Winer posted instructions on How to boot a federated social network now. That hasn’t happened. My opinion is that DNS names for individuals is such a horrible solution that no one has really contemplated it. Just ask John Smith, John Smith and John Smith who should get the johnsmith.name domain.

The solution isn’t going to be found in a global list of names. That keeps the question of which John Smith very much alive.

Instead it’s going to be in a personal list of names. Which John Smith that I know do I mean? The one at work, or the one that’s dating my cousin?

If you stop for a second and think about how you talk about people – it’s all about the relationships. Where you met them, who else they know, how you have interacted.

In my preliminary research, I’ve found two papers talking about personal namespaces. One is talking about devices (so that you can find your desktop computer by the name desktop all over the world) and the other is talking about people.

Facebook already provides part of the personal namespace features. Use the search box to find a name and you will get a list of people sorted by how many mutual friends you have with their avatar image. That’s fine for me because all my Facebook friends are in my monkeysphere. It’s probably not as useful a feature when you have 5000 friends.

Name, name: or /name?

All those facebook friends have a url, something like https://www.facebook.com/somori (which is mine). Question is, how many people actually use their URL? Our survey says “something” because it has been started at the same time as this post was published. My prediction (and that of Mark Allman in the paper on people’s names above) is that the overwhelming majority of people use their real name rather than the technically correct URL.

What does this mean? It means that a persons technical identifier can be a URN made of numbers and digits like pid:d0d2e988fe0a1967b5109ae628833215 (this is just an MD5 hash of my name and the time I made the hash). To a user, it’s as useful as a facebook address, especially as it never gets seen.

Network Solutions had a similar idea and requested the “pin” namespace in RFC3043 over 10 years ago. Nothing much seems to have come of that though, possibly because it was bound to NS’s resolvers rather than being an open protocol.

Mark’s paper goes into greater detail on how a system which allowed people to define their own name for other people using cryptographic tokens and propagate those names might work. Look at section 3 for that information.

Where Next?

Identity is something that can and must transcend services. Whatever system is put in place to allow people within the Federated Social Web to identify each other and their relationships cannot be controlled by any one company if there is to be any freedom in that social web.

Nobody gets to take the ball and go home, because we all get our own.

Facebook Have Made A Major Public Mistake (And How You Can Protect Yourself From The Fallout)

June 12th, 2012

Facebook have made their biggest mistake yet over the last few months. No, it wasn’t forcing everybody to use Timeline. What comes next may be even more obnoxious to their users. There is something you can do about it though.

Read the rest of this entry »


May 30th, 2012

eBays Feedback system has served well for a number of years now. Unfortunately, in the arms race against the scammers, it is starting to look like the French Military circa 1939. Outgunned, outmatched and bunkered down in a massive fortress that never saw battle.

A friend of mine fell afoul of this scam recently.

  1. Buy lots of codes quickly (like iTunes giftcards, BitCoins, WoW TCG Loot codes).
  2. Get some good feedback.
  3. Sell the codes on another account.
  4. Unregister the account.
  5. Reverse all the credit charges for the original codes.
  6. Repeat with a new account.

This is ridiculously easy to get away with. Each new account looks like a great trading partner. Start with the small items, like 25 USD iTunes cards. Move on to multiple 500+ USD purchases like Spectral Tiger Mounts in WoW. Fund terrorists*, I mean, your cocaine habit.

There is also an alternative version – pay for everything with stolen credit cards. It shortens your time frame, but what do you care? You get to trade valuable numbers for hard cash and other people have to deal with the fall-out.

As an armchair engineer, I can see some possible fixes to get eBay back in the arms race:

  • Restrict feedback so that it cannot be left until you receive what you expect from the transaction. Use disputes to fulfill the purpose of negative feedback.
  • Publish the number of disputes an account opens – and their resolutions.
  • If a buyer confirms receipt and then the credit card company does a chargeback – pass the paypal account details on to a criminal fraud investigation team.

If you are on Twitter, get this trending. Tweet #ebayisbroken with a link to this article. Otherwise, pass it on however you know how.

*This is a joke. If I see “eBay scammers fund terrorism” on tomorrow’s Daily Show, I’ll actually be pretty happy. That would mean eBay was listening to this.

Cold calling – the caller’s perspective

April 25th, 2012

Today marks the first day I have ever made cold phone calls to sell anything. Word of mouth isn’t spreading as fast as I would like it to, so I have to prime the pump.

It was horrible to start with. My first phone call went really badly. Not only did I flub the intro by speaking at 60 words a minute, he really wasn’t interested. So uninterested, I didn’t even have time to apologize after finding out before the phone went click.

Disheartening start. Luckily, it got better. The last three people to answer the phone were all lovely bubbly women. All of them giggled at the line “I’m making a sales call, so I’ll understand if you want to hang up.”

No meetings yet, but the important thing was starting. Now the important thing is continuing. Making the sales can come later.