Codecademy: JavaScript “Search Text for Your Name” 7/7 – Victory!

My Sunday nights are even more crazier. “Log it!” 6/7 code: var text = “Adam said: Who the hell is this, paging me at 5:45 in the morning \ crack of dawning. Wipe the cold out of my eye, see who’s this paging \ me, and why. My name is Biggie Adam Smalls.”; var myName = “Adam”; var hits = []; for (var i = 0; i < text.length; i++) { if (myName[0] === text[i]) …

Read more

Codecademy: JavaScript Build “Rock, Paper, Scissors” 9/9 – Next Steps

My Saturday nights are wild. Below is my solution to Codecademy’s JavaScript 9/9. The three goals of the tasks were to: What if a user makes an inappropriate choice like ‘dog’? How can we extend the function to handle that? What if players in the game could also choose Rope in this game? In this version, if both players make the same choice, the game returns a tie. What if the game didn’t end there …

Read more

Raspberry Pi: Installing Raspbian

Required equipment In terms of equipment, you will need the following: 1x SD Card I’m using SanDisk Extreme 16GB Class 10 More information about compatible cards and other information can be found here. 1x Raspberry Pi I’m using the Rev 2.0 Model B w/ 512MB RAM 1x HDMI cable 1x Ethernet cable plugged into your LAN However I’m using the TP-LINK TL-WN725N USB Wireless Adapter which works quite well. 1x compatible keyboard 1x Powered external hard drive I’m …

Read more

Extract data from other Excel worksheets using VLOOKUP

My landlords approached me and asked if I knew anything about Excel. My initial thoughts were “I know how to add and subtract with =SUM() and that’s about it”. But I thought, how hard can it be? They tasked me to sort their product list into one file so all their products had the appropriate product codes, UPC codes, descriptions, cost & sell price and physical attributes (length/width/height/weight). The idea was to then import the …

Read more

How to extend NTFS partition using Linux command line

This post will be dedicated to detailing how I managed to enlarge my NTFS partition on one of my hard disks, without losing any data! All from the Linux command line without using GParted, or any other live boot utility – namely using fdisk and ntfsresize. Note that the disk I’ll be expanding will not be my primary booting device. If you wish to expand your primary drive then you must use a live boot utility. 1. …

Read more

ASUS UX32A not detecting SSD

Is your ASUS UX32A or UX32VD not detecting the iSSD? You’re not alone. Read on… Yesterday the iSSD on my Zenbook died. It wouldn’t be recognised by the BIOS, within Ubuntu, live boot of gparted or even get in to Windows. The POST would just hang for a good 10-15 minutes before it reached GRUB, and even then it wouldn’t go into Windows as the UX32A makes use of ExpressCache and Intel Rapid Storage Technology with …

Read more

Raspberry Pi: network file sharing with samba

This post will demonstrate how you can share files from your RPi, to all your Windows machines that are within your LAN. Start off by updating your repositories and currently installed packages: sudo apt-get update && sudo apt-get upgrade Then progress to install samba, along with samba-common-bin. samba-common-bin will provide you with the testparm utility, that checks your smb.conf file for errors in used syntaxes. This may take a while… sudo apt-get install samba samba-common-bin …

Read more

Raspberry Pi: Configure static IP address and enable local remote access via SSH

It’s worth noting for this tut that you’ll notice I’m configuring my static IP via Putty, which obviously means I’ve previously configured my static IP. I’m just going through the process again but from my Desktop, as screenshots are far easier to manage from here. Configuring a static IP First off, boot up your Raspberry Pi and connect it to your LAN via Ethernet. Type the below command; this will produce your RPi’s network adapter’s …

Read more

A comparison of rsync vs. rdiff-backup

Abstract rsync and rdiff-backup are both incremental solutions, so only the differences in files from source to destination are transferred, not the entire source. rdiff-backup is more CPU intensive than rsync because it SHA-1 checksums everything it encounters[1][2], so if a hash of a file in the destination directory is different to the source file, it then calculates what the differences are between the two and pings them over. rsync, however, is super quick. It doesn’t checksum …

Read more

Cycling without a helmet

Yesterday I was knocked off my bike, as a driver turned into a junction without noticing me beside her. Fortunately, no injuries were incurred other than a few cuts and bruises. However, this certainly put it into perspective for me on how much I take my life for granted when cycling on the road. Any other time I’ve gone out on my bike – never once been hit – have I ever forgotten my helmet. …

Read more