How to install Swift on Ubuntu and add syntax highlighting for Sublime Text

I recently started teaching myself Swift, the new Open Source Language from Apple that powers their latest iOS and MacOS apps. In this article, I’ll go over how I installed it on Ubuntu 14.04 and how I got Sublime Text 2 to recognize it’s syntax. Note that there may be better and more comprehensive ways of doing this, I’m just posting what worked for me. If you have any suggestions to improve this, please be sure leave a comment.

Directions adapted from this post.

Start by clicking here and downloading the latest snapshot for Linux. For me it was called Ubuntu 14.04 Swift Development Snapshot, posted on Feb 3, 2016.

Continue reading

Advertisements

How to Use Intel’s PIN program: A super simple tutorial

If you’re reading this, you probably already know what pin is for, but basically it is used to profile programs. You can use it to answer things like how many instructions does this executable have or how many branches occur, etc. It does this in most cases by inserting counters and other code while your executable is running. So let’s get to a quick demo.

I will be demonstrating with Linux, specifically with Ubuntu, because this was a headache on Windows. Note that you might need root permission to execute some of these commands, so if they don’t work, try re-running with sudo.

(1) Download the pin program tarball
Download the tool from here, making sure that you have a compatible version of gcc. Continue reading

Freelance Photographer

This was from a conversation between two classmates years ago when I was in high school. Thinking about it today still makes me laugh and I wonder if either of them might one day stumble upon this and remember, too. (Names changed for privacy.)


 

Alan: What does you mom do?

Judy: My mom is a freelance photographer.

Alan: What does that mean? Free of job?

Judy: No! It means she works whenever she wants to.

Alan: . . . Yeah. Free of job.

Things I Wish I Knew for Hajj

Before Hajj, I would have been glad to know a few things about the way it works over there. The following is a list of stuff that I wish I new before I started Hajj and that would’ve help me prepare better, or at least brace myself.

Free Food as You Arrive

Between Jeddah’s Airport and our arrival at the hotel, we received free food and/or beverages several times on the bus. Don’t store too much food from home in your bag if you want to keep what you don’t eat. Wasting good food is sinful, but it’s also hard to find someone willing to take it. The beggars on the street only want your money, not your food. In fact, I’ve seen what appeared to be perfectly fine food rotting in the streets of Mecca plenty of times. It’s really sad, but part of a larger global food waste problem.

Continue reading

Stuff You’ll Wish You Brought for Hajj

Hello Readers, I’ve just come back from Hajj, the yearly pilgrimage for Muslims and the following is a list of things that, should you ever go, you’ll be glad you brought along.

 

Extra Bed Sheets and Pillow Cases

The hotel we stayed at in Mecca was run-down, dirty and down right gross sometimes. I pray you don’t have the same experience that I do, but if you, you’ll be glad you brought extra bedsheets. I don’t know when the ones in my room were last washed and even the new “clean” ones they gave me smelled questionable to say the least. Using my own sheets at least gives me some peace of mind in that regard. If you don’t want the extra baggage, you could also probably buy some in the market. In addition to your hotel, they could prove useful at Mina and just praying in Jammat with a bunch of other people when prayer rugs aren’t available for everyone.

Continue reading

So, your garage door won’t close, eh?

We’ve been having problems with our garage door for a while now, where when we tried to close it, the door would come down all the way to the ground then suddenly pull right back up as if someone gave it the open command. This would go on and on and trying to close a garage door a dozen times in a row is understandably frustrating. If you’re in this situation, here’s a list of things we tried that finally (I hope) got it to close for good.

Continue reading

Tech Review: Toshiba Canvio Slim 500 GB External Hard-drive

My Rating: 4.5 out of 5 What is it? The Toshiba Canvio Slim is an external hard-drive that can be used for sharing files, storing photos or making a backup of an entire internal drive.

The Toshiba Canvio Slim External Hard Drive with included SATA to USB cable.

The Toshiba Canvio Slim External Hard Drive with included SATA to USB cable.

The Good One of the first things you’ll notice when you take this HDD out of the box is it’s superb aesthetic design. If it wasn’t for the fact that it was black and gray, I’d say it was Apple inspired. Continue reading

A Cool Project that Needs Your Support: HabitRPG

Habit RPG

In life, there are things we have to do and there are things that we want to do. Rarely do these two categories overlap and I (like many of you out there) wish there was a way to get both types done. We can make lists, deadlines or whatever to put these goals in front of us, but at the end of the day we just don’t have the motivation to get it done! That is where Tyler Renelle’s HabitRPG comes in.

Continue reading

Cool Theme Backgrounds #1

Check out the following small collection of cool Star Wars backgrounds. If you have any you’d like to suggest for the next post, leave a comment with the link and I’ll check it out for next time. Enjoy! (Please refresh if the images don’t load.)