Run Windows 7 on a OSX (Macbook Air, Pro, etc) with Bootcamp

0 comments

Although the instructions are for Windows 7, the same should apply for Windows 8.1.

Preparing your USB installer

  • Insert the USB you want to use as the "install source"
  • Copy your Windows 7 ISO file to the desktop
  • In the Spotlight (magnifying glass in the top-right corner of your screen), type in "bootcamp"
  • Select "Boot Camp Assistant"

IMG_20150126_194027

  • Click continue to pass the intro screen
  • Select "Create a Windows 7 or later version install disk"
  • Select "Install Windows 7 or later version"
  • It'll automatically select the ISO file for you and the destination disk, but double check it just to make sure.
  • Once ready, click continue
  • Confirm you're OK with wiping the destination USB.
  • Wait ages for it to copy files to USB.
  • At the end of that, it may ask you to plug the Macbook into a power source (if you're running on battery)
  • Now is a good time to ensure that you're connected to the internet. If you don't, it'll make you restart the bloody process because you're not online... Yes, it happened to me first time I tried this. You'll only get a notification with the "OK" button, no retry.
  • Now you'll have to wait for it to finish downloading Windows hardware drivers (about 1GB I think). This will take a really long time as well, so go play Shovel Knight or something.
  • Once it's done, select how much space you want to allocate your operating systems. I pretty much gave as much space as I could to Windows because there's no intention of coming back to OSX.
  • It'll automatically reboot into the Windows setup after it's done resizing the partitions.

IMG_20150126_205229

Installing Windows

This step is pretty straight forward. The only thing you need to make sure is that you format the bootcamp drive appropriately.

  • Select "Custom (advanced)" when you get to the "Which type of installation do you want?" screen
  • Select the "BOOTCAMP" drive
  • Click "Drive options (advanced)" to reveal more options
  • Click "Format"

IMG_20150126_205904 IMG_20150126_205921

  • Give it time to install and prepare Windows. It'll automatically reboot once or twice during that process.

Configuring Windows

Once you're in Windows, there's a few extra steps are involved in making the operating system more tolerable for day to day use.

Assuming you still have the installation USB plugged in:

  • Open up Windows Explorer and go to X:\Bootcamp\ (where X: is your USB drive, labelled WININSTALL).
  • From there you can find the Bootcamp setup for Windows.
  • Run the setup

IMG_20150126_211318

  • This will automatically proceed to install driver software for your hardware such as touchpad, graphics card, motherboard, webcam, etc.
  • It'll need to restart your computer before you can continue.
  • Once you're back in, look for "Boot Camp" in the start menu.

IMG_20150126_212031

  • Once you're in, go to the "Keyboard" tab and tick "Use all F1, F2, etc keys as standard function keys"
  • Go into "Trackpad" and configure the trackpad to your liking. Look at my configuration if you're unsure what you want as "normal" settings.
  • That should be everything needed for you to get up and running with Windows on a Macbook.

 IMG_20150126_212138

Sources

Python: A warning when using the XKCD password generator

0 comments

If you're not familiar with the problem yet, have a look at the comic below.

Come along redacted's XKCD-password-generator which turns this into a Python-module reality for us to easily plug into our code.

pip install xkcdpass

And in your code:

from xkcdpass import xkcd_password

wordfile = xkcd_password.locate_wordfile()
mywords = xkcd_password.generate_wordlist(wordfile=wordfile)
random_password = xkcd_password.generate_xkcdpassword(mywords, n_words = 3, delim='.')

This is all fine and very easy to use. However, there is a small catch.

priest.fucking.choirboy

Believe it or not, this is a combination that is possible with the default dictionary.

By using the default password file supplied by 12Dicts in the function locate_wordfile(), you are potentially including swear words and religious references. The potential mix of these and regular words CAN be offensive, especially when you're automatically generating these for users and sending them out blindly.

Depending on how this code is used, the recent events at Charlie Hebdo's office in Paris is a good motivation to make sure watch your words.

belldem 
When random words suddenly have meaning...

Here's one I prepared earlier

I spent about 2 days scanning the file for potentially offensive words. I've taken out as many words as I could relating to the following categories:

  • religion
  • swearing
  • sex and sexual connotations
  • drugs
  • health and/or disease related words
  • violence
  • names of people or countries

Since it was a horribly mundane task, I'm sure I've missed some. If you find some, please let me know by leaving a comment below.

For those inclined to download and run, you can grab a cleansed password file from github.

Then fix the code to use your own file:

from xkcdpass import xkcd_password

wordfile = "users/passwords.txt" # Previously xkcd_password.locate_wordfile()
mywords = xkcd_password.generate_wordlist(wordfile=wordfile)
random_password = xkcd_password.generate_xkcdpassword(mywords, n_words = 3, delim='.')

I've provided a patch/diff file for the words I've removed.

Sources

 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog