CBC Report: Free Android App Allows Easy Credit Card Skimming

by Phaedra Deepsky


via CBC News

Using a Samsung Galaxy S3 -- one of the most popular smartphones available in Canada -- and a free app downloaded from the Google Play store, CBC News was able to read information such as a card number, expiry date and cardholder name simply holding the smartphone over a credit or debit card.

Time to start carrying the tinfoil purse I guess.

Comment

Title Case THIS

by Phaedra Deepsky


title: Title Case THIS date: April 20, 2013 category: Mac Nerdery tags: Objective-C

Panning for gold in the stream that is Twitter this afternoon led to a pretty good nugget from Gabe over at Macdrifter in the form of a blog post by Megan Taylor titled “I finished Codecademy, now what?” Megans post is a compilation of resources aimed at Python, Javascript and PHP developers who have finished up introductory level courses and are looking for places to apply their newfound skills.

One thing led to another and I founf myself over at reddit’s Daily Programmer board. The first challenge I tried was the easy level Title Case. Basically, the task was to write some basic code that would capitalize a string. The catch was that your code needed to not capitalize certain words that appeared in a list of exceptions, except if the word was the first word of the sentence. Here is my crack at the solution, in Objective-C:

#import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) {

@autoreleasepool {
    NSString *theInput = [@"sometimes THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG." capitalizedString];
    NSArray *theExceptions = [[@"jumps, the, over" stringByReplacingOccurrencesOfString:@" " withString:@""] componentsSeparatedByString:@","];


    for (NSString *exception in theExceptions) {
        NSError *error = NULL;
        NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:exception options:NSRegularExpressionCaseInsensitive error:&error];
        theInput = [regex stringByReplacingMatchesInString:theInput options:0 range:NSMakeRange(0, [theInput length]) withTemplate:[exception lowercaseString]];
    }

    NSMutableArray *result = [[theInput componentsSeparatedByString:@" "] mutableCopy];
    result[0] = [result[0] capitalizedString];

    theInput = [result componentsJoinedByString:@" "];

    NSLog(@"%@", theInput);

}
return 0;

}

Comment

A couple of Javascript tutorials

by Phaedra Deepsky in


Things have been kind of quiet in the Vegans With Typewriters labs on the Objective-C front lately. GDIP is somewhat stable and I haven’t really been motivated to mess with it lately, mostly because I’ve been putting things back together after replacing the hard drive in my iMac, but partly because I was trying a demo of a codeless document based core data app that just would not load the document I had just saved. I ended up putting Xcode down for a while and having a look at some other stuff.

One of the other things that I’ve been playing with is setting up my own server from scratch. Eventually, I’d like to move the Vegans With Typewriters blog to a platform that I have a little more control over. Squarespace is nice and everything, but for some reason I just can’t seem to wrap my head around their template system. As much as it pains me to say it, for me, php and Wordpress is slightly less inscrutable and there are a lot more examples and tutorials out there on how to customize it.

That being said, tonight I was dicking around with Javascript (my first somewhat serious attempt at it) and I found a couple of great free tutorials over on YouTube. They’re both by Derek Banas and can be found here and here.

The first tutorial is a 31 minute plow through the fundamentals of the language covering the basic syntax and flow control. The second tutorial is a pretty good introduction to monitoring events such as onMouseOver() and stuff like that.

If you’re interested in playing around with Javascript, pur yourself some coffee, fire up your favourite text editor, and give these a watch. You’ll be surprised at how easy it actually is to do stuff.

Comment

Running Shell Scripts on a Mac

by Phaedra Deepsky in


Dear Vegans With Typewriters,

I’m trying to do XYZ on my Mac and I need to run a shell script to set it up. How do I do this?

Thanks
Bill in Cincinatti

Ok, so this didn’t really happen. What did happen though was I was doing some maintenance on my budding git repositories, and thanks to Brett Terpstra’s Vulcan logic, you were spared an article on how to set up Hazel to automatically add a .gitignore files into new git repositories. Instead, I just set up a .gitignore_global file located in the root directory of my Dropbox folder. In order for this to work, I needed to tell git that there were new global ignore settings by typing git config --global core.excludesfile ~/path/to/.gitignore_global

During this process, I decided that this might be something handy to automate if I need to set it up on another machine, so I wrote a shell script for the git config and stuck it in my ~/Dropbox/Setup/ folder. All of this is a really long introduction for what I really wanted to tell you about (and save to my external brain) which was how to actually run a shell script in Terminal on your Mac.

The simplest way to do this is to cd your way over to where the script resides and type in:

> sh myScript.sh

That’s about it. Depending on what you’re doing, Terminal may complain that you need to have root permission to do something, so in that case you would type in:

> sudo sh myScript.sh

An alternative way of doing this is to set up your file with executable permissons like this:

> chmod +x myScript.sh

Which then allows you to run your scripts by simply typing in:

> ./myScript.sh

Tinfoil Radio

by Phaedra Deepsky


I'm approaching the nexus of crazy on late night AM talk radio. Tonight I beat my personal best of the right-wing fundamentalist Reganist with a full-on Revelationist served with a side dish of New World Order, HAARP earthquakes as the spicy sauce and topped with sprinkles of EMP attacks and Obama is the antichrist. It was almost like what I imagine listening to the love child of Alex Jones and Harold Camping would sound like. This one is going to be hard to beat.

Comment

From the ZOMG WE'RE GONNA DIE!!! file:

by Phaedra Deepsky in


NASA warns 'something unexpected is happening to the Sun'

Basically they're expecting the solar maximum to be double peaked like it was in 1989 and 2001, so, we're probably not going to die from the sun exploding.

As pointed out by Bambi Blue, the comments are totally different from YouTube comments:

Jasper my friend do some research before posting comments. I am embarrassed for you. Our sun is currently a G2 star on the Main Sequence,its mass was determined at it's birth and it was never a O type super giant. As it ages it will get larger and cooler but the mass will not change significantly until the end of it's life when it's outer layer will evaporate leaving behind a White Dwarf. Ignorance of science gives me great pain. Do the research, expand your knowledge and enjoy the experience.


Wish You Were Here

by Phaedra Deepsky in


For the one reader who has been following along somewhat regularly and wondering just where the hell I’ve gone to, don’t worry, I haven’t abandoned the blog. Instead of writing, I’ve been spending a lot of time on two side projects that were previously simmering in the background.

The first project is to finally get around to learning to play the guitar. My dad used to play, my brother still does. I grew up with guitars around me and yet I never actually learned to play much beyond being able to pick out a basic G chord and calling it a day. Last summer, somewhat inspired by Jim Dalrymple’s show Amplified, I started taking lessons from a friend of ours who is a professional musician.

So far, the results have been promising. I’ve managed to improve from complete rookie status to being able to play a passable rendition of Wish You Were Here. I think David Gilmour’s job is safe for the time being though.

The other thing that’s been keeping me away from writing is, well, writing, sort of. I’ve been head down working on the other project that I’ve touched on before, namely learning how to code all over again, but this time with Objective-C and Cocoa.

After six months of scratching my way up from Hello World, I’ve managed to build something resembling an actual app. Thanks to the input of a few people on the NSBrief Glassboard, the project provisionally known as GDIP is approaching 1.0 status.

What’s GDIP you may ask? GDIP is a little app that rides in the status bar that answers the question, “What’s my GD IP?” The reason I’m writing it, other than being an exercise in coding, is to save having to load up WhatIsMyIP or go digging in Network Preferences those few times a month that I actually look at the site logs.

If you’ve managed to make it this far, you’re probably a) my one actual reader, and b) wondering what’s next. Well, the plan as it stands is to keep coding, keep picking, and keep writing. Expect to see more stuff about code and guitars, and less about current events. Other people are doing news much better than I am, so I’ll stick with topics that I actually enjoy writing about. Oh, and the how-to posts aren’t going away. Sorry.

Comment

Nerdy Web Finds

by Phaedra Deepsky in


Wikimapia

The first site that I want to bring you this update is wikimapia. Imagine, if you will, Wikipedia laid on top of Google Maps. Wikimapia lets users perform multi-layered annotation of maps, so you can describe stuff around you. I think my first project will be documenting the old Kingston and Peterborough railway line. I’ve traced it before on Google Earth, but now someone can actually see it.

Phone Trips

Straight out of 1996 is the Phone Trips website. Phone Trips is a collection of recordings made by Mark Bernay in the late 1960’s and early 1970’s of the pops, clicks and whistles made by the phone system as he and his friends played around with innards of what was the world’s biggest machine. If you’re wondering what I’m on about, check out this video of Captain Crunch and The Cheshire Catalyst from 2004 speaking at the Fifth HOPE conference.

Flexible Time Stamps in Drafts

I started using Drafts by Agile Tortoise on my iPhone about a month ago and haven’t looked back. Quick input and flexible output make Drafts a winner for me. On the latest revision of Drafts, the developers increased the flexibility of how timestamps are applied and this article by Dr. Drang explains how they work and gives some neat examples to play with.

Comment

VIM Weirdness and Git Tutorial Found

by Phaedra Deepsky in


For tonight’s bit of weirdness, all of a sudden Markdown syntax highlighting started working in VIM. I had installed a pack from somewhere, but it never really worked, so I forgot about it, until I was writing a quick note for a project I was working on.

Anyway, in my last post, I talked about Ryan Hodson’s awesome Objective C tutorial. Just a couple of clicks away on the same site, Ryan has a step by step hands-on tutorial about Git. It’s awesome version-ey goodness that has applications beyond coding. That great novel you’re writing should be in a git repo just as much as anything. If you’re doing anything that involves changes and revisions, it’s worth implementing some kind of version control system.

Comment

TAGS:


Scott Lively Warns of End Times Because of Marriage Equality

by Phaedra Deepsky in


Via Right Wing Watch:

We need to remember that in the time leading up to the Flood what the rabbis teach about the last straw for God before He brought the Flood was when they started writing wedding songs to homosexual marriage and Jesus said that you’ll know the End Times because it will be like the days of Noah. There’s never been a time in the history of the world since before the Flood when homosexual marriage has been open and celebrated, and that’s another sign that I believe that we’re close to the end.

Well, what are you waiting for? You better grab your flock and head for the hills, preferably the ones without an internet connexion.