rss
email
twitter
facebook

PuTTy Presets

Putty is an amazing tool for things like SSH, Serial, and Telnet, in windows. Here is a list of presets that will make your life more betters ;)


Window > Lines of scrollback: 99999
This will allow you to scroll through your session logs for that many lines

Connection > Seconds between keepalives: 20
Connection > Enable TCP keepalives: yes 

This will come in handy if you have connection issues, faulty equipment, etc.

Connection > Data > Terminal-type string: “linux”
This makes sure your “arrow up” is an “arrow up”

Connection > SSH > Enable compression: enabled
This will cost you a tiny bit of CPU time on both sides, but will increase performance over poor connections.

Now that you've finally changed all these settings, make sure PuTTY remembers them by going to Session and clicking the Save button.

Find your iPhone, even when its dead.


In iOS you can use "Find My iPhone" to hunt down your lost devices. This requires your device to be powered on and have a connection, ether cellular, or wifi. In the event you device is dead, Apple has your back.

Send Last Location”, sends the last known location of the iOS device to Apple when the battery becomes critically low. What this means for you as the person looking for the missing iPhone, is that the last place it was physically located will show up on your very own Find My iPhone map, and with that, hopefully the ability to go find the now battery-drained device.

To enable, do the following:
  1. From your phone, go to Settings
  2. Click on iCloud
  3. Select “Find My iPhone” and flip the switch next to “Send Last Location” to the ON position

10 Tricks for using Google

1.  Searching for content in a blog
Trying to find something specific in a blog? Google using Colon ( : ) sign . For example you are looking for OSX tricksand you know geeknthings.com might have that. Type “OSX Tricks : geeknthings”

2. Search for specific file types
Sometimes you need to find a particular file type, like a PDF or DOC. You can directly find it by just using Colon sign. For example, If i want an pdf file of a NDA Form then I would type “NDA : pdf”

3. Search for goods within a price point
When you are looking for something in a particular price range, search using Triple Dot(…) sign. For example: iPhone 200 ... 500

4. Converting money
Want to see how much $50 USD is in Euro, type the following: $50 converted to euro

5. Get the Weather, anywhere!
Want to know how hot it is in Las Vegas? Type: Weather Las Vegas, NV

6. Defining words
To look up the definition of any word, type: Define "your-word-here"

7. Math
Type your math problem into the search and the 1st result will be the answer.

8. Enable Safe Search
To enable safe search for just that one search, type safe search : "your search here" and your results will be filtered.

9. Find Licence Free Images
Want to find a picture you can use on your website, do the following:
  1. Search for Image. like : “Wallpapers”
  2. Click On “Images” tab.
  3. At the last you will see a “Search Tool ” tab click on it.
  4. Now another Tab menu will appear. Click on ” User Rights ” .
  5. Now there will be 5 options 
    • Not Filtered By Licence. 
    • Labeled For Reuse with Modification. 
    • Labeled For Reuse. 
    • Labeled for Non commercial reuse with Modification. 
    • labeled For Non commercial reuse. 
10. This one is just fun.
From www.google.com, type "tilt" in the search field

Restoring your data from Time Machine using Migration Assistant


This is a rundown of how to restore your data from a Time Machine backup using Migration Assistant. This is useful when you want to restore data from a backup when using a new computer, or if you want to restore a user account.

Step 1. Launch Migration Assistant
There are lots of different ways to find the Migration Assistant app.

  • Do a Spotlight Search for Migration Assistant
  • From Finder, click the Go menu in the title bar, choose Utilities, then Migration Assistant
  • Open a Finder window and navigate to Applications > Utilities then Migration Assistant
The first window informs you that Migration Assistant will quit all other apps. Click Continue and enter your admin password and OK. Mac OS X closes all other apps and starts the Migration Assistant program.

In the Migration Assistant app click on Choose From A Mac, Time Machine Backup, Or Startup Disk and click Continue.

Step 2. Select Your Backup
Migration Assistant should locate a Time Capsule located on the same network, or a Time Machine USB drive that is connected to the Mac. Click on it in the Migration Assistant Window to select it, and click Continue. If you are using a Time Machine, you need to enter the password (for the Time Machine, not your Admin or Wi-Fi password). Click Connect.

Now choose a Stored Volume from the list in the Migration Window. There will usually just be one, unless you have backed up multiple Macs to the Time Capsule or Time Machine disk. Click on Continue. Then you’ll be asked which Volume you’d like to transfer information; there is typically one option, unless you have multiple Volumes on the Mac.

Step 2. Choose the Data to be Restored
Now you’ll be asked which information you want to transfer. If you’ve already configured an account that uses the same name as the account you are replacing, then you see a red warning and This User Needs Attention Before Migrating. When you click Continue, a sheet appears offering options to Replace or Keep Both User Accounts. If you opt for Keep Both User Accounts, you must fill out the New Name and User Account Name fields.

You can also choose to migrate Applications, Computer & Network Settings and Other Files and Folders. A drop-down menu here enables you to choose which elements to migrate: Documents, Music, Pictures, and so on. However, it is the account you need to take with you in order to continue using the Time Machine Backup on a new Mac computer. 

Check the boxes next to the data you wish to restore. If you already have any of the programs installed, there is no point in restoring them. Click Continue to migrate the Time Machine backup from one Mac to another.

Apple OSX Yosemite Tricks

Apple released OS X 10.10 Yosemite, and there is a lot of cool stuff hiding just under the hood. Here are a few of my favorite tips/tricks and hacks.

Record your iPhone or iPad's output

With Yosemite all you need do is attach the device to your Mac via USB and then open QuickTime Player. Then select File > New Movie Recording.

QuickTime will default to your Mac’s iSight camera (assuming it has one), but click the small down arrow alongside the record button and your iPad or iPhone will show-up as an option.

Annotate better in Preview

To access the new tools, click the Toolbox icon at the right of the toolbar, alongside the Search field.

Sketch: The pen icon lets you draw a shape, which is autocorrected to its nearest canonical shape — draw a circle and it’ll be converted to a perfect circle. A floating toolbar will appear offering the chance to switch back to your rough sketch.

Get Java
Considering the security risks presented by the Java Runtime add-on, Apple has perhaps wisely removed it entirely from Yosemite - even if you already had it installed in Mavericks.

Certain apps like Minecraft and Adobe Photoshop CS5 require the version of Java provided by Apple, even though this is a little ancient. The solution is to install both Apple and Oracle's versions, and the two can exist in harmony side-by-side. Apple's Java can be found and installed via here, while Oracle's up-to-date version of Java can be found here(select to download the JRE version).

Change FaceTime's ringtone

Open FaceTime and then open its Preferences panel (Cmd+,). Then choose by opening the Ringtone dropdown list at the bottom.


To change the alert noise that accompanies text messages displayed on your Mac’s screen, open Messages and open its preferences dialog box (Cmd+,), then select from the options in the Message Received Sound dropdown list.


Turn off Dashboard
Dashboard (the home of Widgets before they became part of the Notification Centre) was one of the big new features of OS X a few years ago. Sadly, nobody ever uses it, outside of a hard-core minority of fans.

Open System Preferences, click the Mission Control option, and select the Off option from the dropdown list alongside the Dashboard heading.

Sign things using your trackpad

If you’ve got a finger and a MacBook or Magic Trackpad then you can now sign PDFs within Preview.

Start by clicking the toolbox icon at the top right of the Preview toolbar (next to the search field), and then click the signature icon beneath (sixth from the left).

Then click Create Signature, ensure the Trackpad tab is selected, and then click to begin as directed. When you’ve finished you can select the signature from the menu, then drag it to wherever you want it to appear.

Work easier with network shares
In Yosemite, Finder assumes you want Windows file sharing, which is used nearly everywhere (also known as SMB). In other words, all you need do now to access a shared folder on another computer is open Finder or click the desktop, tap Cmd+K, and then type the IP address or hostname of the computer you want to connect to, without the need to precede it with smb://, like you used to have to. (If you have to make an AFP connection, just precede the address with afp://)

Unify your passwords

In Yosemite you can now login using your iCloud password, rather than having to remember a separate login password just for your Mac.

To activate this feature open System Preferences, then click the Users & Groups icon. Then click the padlock icon at the bottom left to unlock the preferences system, and click the Change Password button. Finally, click the Use iCloud Password button.


Dial phone numbers with FaceTime
You can take phone calls from your nearby iPhone in Yosemite, but did you know you can make calls from the FaceTime app? As long as your iPhone and Mac are on the same Wi-Fi network, you can search for a number in FaceTime and place the call. Click the phone icon next to a contact for the option to call using iPhone.

Dark Mode

Yosemite comes with a dark mode for the menu bar and Dock. Go to System Preferences > General, and enable “Use dark menu bar and Dock”.
Volume Feedback
You can activate it in System Preferences > Sound > Sound Effect by checking “Play feedback when volume is changed”.

Web design for the rest of us.

When I founded Tech Runners in March of 2014, I figured the 1st thing to do when owning a business is to have a website. The trouble is, I don't code. 

With that in mind I started hunting around for a WYSIWYG solution. WYSIWYG (pronounced wizz-e-wig), is an acronym for What You See Is What You Get. What that basically means, is rather than write the code of a website, you build it visually. You drag and drop all the elements of the page, so that you see the final product at all times. Don't like that text there? Want to add new page or photo gallery? No problem, just drag it where you want it.

After a ton of homework, checking out places like WIX and JIMDO, I ended up at my top pick, Squarespace. One of the fist things that stood out for me, was their homepage... It was actually, good. Unlike their competitors, Squarespace's page, wasn't cutesy, cluttered with adds, links and reviews. It was minimalistic, and elegant.
It gave the impression of something very professional, and polished, with out all the flair. The background photo spanned off the page, and also had a subtle parallax effect, reenforcing the quality, without needing to be flashy. That concept of simple, minimalistic elegance is pervasive through every aspect of the site. 

When you start a site with one of these services, the first thing you do is pick a template. Squarespace's template are fantastic. There is something there for every kind of site. They are constantly releasing more, all reflecting the latest styles and trends, and technology in web design. When you choose a Squarespace template, you get a LOT more than just a page that already has a layout. Each theme has a ton of different styles and technology that sets them apart from each other. One site might be made of of a series of pages that you can browse by just scrolling down, like this. Another template utilizes full page photos, layers and parallax to provide a feeling of depth, like this.
As you browse the catalog of templates, you can not only click them to see and play with a completely interactive version of that template, but see plenty of samples of what others have done with this template. The ability to easily see all this content and comparison without having to go hunting, open multiple pages, and tabs, is another major selling point for me. After you have found a look and feel you like, with a single click, you now have a copy of the site to play with. Squarespace's templating system doesn't stop there. lets say you pick one, work on it, but want to try another template. Through the settings panel of your site, you can browse their other templates and even preview your content using that design in a single click. 

Squarespace takes its philosophy of Do More with Less, to heart, and it really shines through with its tools. After you have picked your template, you are taken to the editor. The editor looks just like your site, with a few additions. As you hover your mouse over any part of the site, that element is outlined and you are presented with that elements options. There is almost zero learning curve.
Want to change anything, simply click on the object, and change its options. Want to add a new element, click on the location, and you are presented with your choices of what to add there. The ability to do all this, without a single page reload, tab opened, or screen refreshed, really drives home the level of polish Squarespace puts into their tools, and technology.

Everything Squarespace does from its page wide settings, SEO, google integration and more, really sets them apart from their competition. They even give you a 30 day trial, all with out setting up billing. If you can't tell, I'm a HUGE fan, and highly recommend you head over and check them out.

Password Protect Zip Files in Mac OS X

Set a Zip Password in Mac OS X
You can create password protected archives of files and folders:
  1. Launch the Terminal from the Applications > Utilities folder
  2. Type the following command:
  3. zip -e archivename.zip filetoprotect.txt
  4. Enter and verify the password – don’t forget this
The resulting archive, in this case named “archivename.zip”, is now encrypted with the password provided. The file that was encrypted, “filetoprotect.txt”, is now inaccessible without entering that password.
If you plan on compressing multiple files within a folder, you will want to slightly modify the command with the -er flag like so:
zip -er archive.zip /path/to/directory/
This is particularly important for encrypting zips of multiple files under OS X Mavericks.

ESXi / VSphere 5 CLI update

First off, you need the newest release of the CLI install package from VMware, which can be freely downloaded here.

Having installed, I highly recommend a restart of the workstation you using the CLI on. On my system, some of the Perl related libraries the CLI depends on didn’t seem to work till I did a restart.

Having restarted, bring up a Windows command line prompt, ideally in elevated admin mode (to make sure you have unrestricted access to your own system). Normal mode should be ok, as long as your update files have been downloaded to a local file system that can be accessed by your user account.

You also need to have the VMware vSphere Client installed, which you should be able to get (if you don’t have it already) just be entering the IP address of your ESXi host in a web browser window. The web server running on there should give you a download link.

Finally, go on the VMware website, and download the latest patches you want to apply to your ESXi 5 setup. At this present moment in time, I was applying the major Nov 2011 update, which brought me up to ESXi 5.0.0 build 515841.

For simplicity, having downloaded the latest ‘vib’ update (VMware’s terminology for an update archive, normally in the form of a ZIP file), I renamed it to Update.zip.

Having done this, you will need to upload the file into one of your storage volumes via the vSphere client. Note the path location to where you put the file. Furthermore, make a note of the full storage mount location of the actual data store, which can be found by selecting the datastore under Configuration -> Storage in vSphere client, and looking in the bottom panel labelled Datastore Details. As much as a pain it might be, my findings were that it was easiest to take the whole entry next to ‘Location’ and not substituting the common name of the datastore (so the entry you need will have a long GUID type path entry).

Go back to the Windows command line and type one of the following from the command prompt in order to get in to the CLI script folder:

For 32-bit OS:
cd C:\Program Files\VMware\VMware vSphere CLI\bin

For 64-bit OS:
cd C:\Program Files (x86)\VMware\VMware vSphere CLI\bin

You may also wish to enter your host in to maintenance mode before doing the update, which can be easily done from the vSphere Client.

Finally type the following command:

esxcli -s 192.168.0.10 -u root -p password software vib install -d
/vmfs/volumes/4ff41a22-76ab1cd3-2516-001ed2a2e4dc/Updates/Update.zip

In the above, I’ve put my personal entries in unboldened italics. You will need to put in your own entries as follows:

-s    Your Server IP or Hostname
-u    Your ESXi host admin user name, normally ‘root’
-p    Your ESXi host password
-d    The location of your Update.zip file, using the location of the datastore, and the further folder location you may have created to put the update in (the ‘d’ stands for ‘depot’, by the way).

When you hit enter, the cursor will drop for a time, and nothing may appear to happen for several minutes. If the update is successful, you will eventually get an installation result message confirming all is ok, with a list of all updates applied. If it fails, I assume it will tell you, but it has yet to fail for me :)

You will then need to go back in to the vSphere client, restart the ESXi server, and then take it out of maintenance mode. Then manually fire up any virtual machines you have. You should then be done.

There may be a way of applying multiple updates simulteneously, but I’ve yet to need to do that. Doing one file at a time should work ok though (I suggest oldest updates first).

Windows Server 2012 Eval Activation




So I’m at the end of the trial period for Windows Server 2012, and having a bought a volume license for the Data Center edition, I need to activate it. Microsoft have taken away the ability to alter product keys through Control Panel -> System so we have to use the command line.

I’ve read a lot of articles out there on this, which generally don’t work, presenting an error when you try and process your new key using the slmgr command line tool.

First of all, you need to establish your exact currently installed version. From a elevated command prompt, run the following command:

DISM /online /Get-CurrentEdition

In amongst the blurb that appears on screen, it will tell you your current edition (in my case ServerDatacenterEval). Make a note of this – you will use in the next command with the last ‘Eval’ bit ommitted.

With your license key to hand, now run following command:

DISM /online /Set-Edition:ServerDatacenter /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula

The above unboldened / italicised entries will need to be your own specific variables (remember to drop the ‘Eval’ bit for the Set-Edition). I believe, you can also use this as an opportunity to upgrade to a higher edition, for example using the /Set-Edition switch to go from Standard up to Datacenter. The /AcceptEula switch allows the system to silently accept the Microsoft license agreement.

When you run this command, your system will need to restart 1 or 2 times. Thereafter (if it doesn’t happen automatically) you will be able to activate with your newly provided key from Control Panel -> System or using the slmgr tool, and you will now be running your licensed copy :)

Editing fstab to automount partitions at startup

auto mounting partitions is very easy in linuxmint with the disk utility which have a nice gui explaining everyting.

but now i am going to show you a staright forward process of automonting partitions by editing /etc/fstab file.

this tutorial is not solely for automounting but how to edit fstab efficiently and gaining some knowledge about it.

steps:

1. sudo gedit /etc/fstab

2. now the fstab file is open in gedit. you need to add an entry for the partition to automount it at startup.

the format of a new entry is like this:

  file_system   mount_point   type  options     dump  pass          

you will see this in the file and you need to add your new entry under this line.

brief explanation of the above format:

1.file_system = your device id.

use this:

/dev/sdax ( you should check it with sudo fdisk -l)

it may be /dev/sdbx or /dev/sdcx if you have more than one disks connected.

2. mount_point =where you want to mount your partition.

use this:

/media/user/label

here user is your user name, label is "software", "movies" or whatever label your partiton have.

3. type=fat32,ntfs, ntfs-3g,ext2,ext4 or whatever your partition type is.

4. options =mount options for the partition(explained later).

5. dump=Enable or disable backing up of the device/partition .usually set to 0, which disables it.

6. pass =Controls the order in which fsck checks the device/partition for errors at boot time. The root device should be 1. Other partitions should be 2, or 0 to disable checking.

so for auto mounting case the above format reduces to:

/dev/sdax /media/user/label  type  options           0  0

(you can check the type with sudo fdisk -l)

the options field:

sync/async - All I/O to the file system should be done synchronously/asynchronously.
auto/noauto - The filesystem will be mounted automatically at startup/The filesystem will NOT be automatically mounted at startup.
dev/nodev - Interpret/Do not interpret character or block special devices on the file system.
exec / noexec - Permit/Prevent the execution of binaries from the filesystem.
suid/nosuid - Permit/Block the operation of suid, and sgid bits.
ro/rw - Mount read-only/Mount read-write.
user/nouser - Permit any user to mount the filesystem. (This automatically implies noexec, nosuid,nodev unless overridden) / Only permit root to mount the filesystem. This is also a default setting.
defaults - Use default settings. Equivalent to rw, suid, dev, exec, auto, nouser, async.
_netdev - this is a network device, mount it after bringing up the network. Only valid with fstype nfs.
now the final format reduces to (for auto mount):

/dev/sdax /media/user/label  type     defaults       0  0

for ntfs

/dev/sdax /media/user/label   ntfs  defaults       0  0

for ext4

/dev/sdax /media/user/label   ext4  defaults       0  0

etc.....

you can change defaults by your own configuration, like

/dev/sdax /media/user/label   ext4  rw,suid,dev,noexec,auto,user,async      0  0

etc...

you need to add entry for each partiton you want to auto mount.

3. save and exit the file then restart and see the result.

Run level 3 Centos 7

Seems CentOS 7 has no longer support run level setting in inittab here is what to do:


Runlevel 3 is now multi-user.target and runlevel 5 is now graphical.target.

systemctl set-default multi-user.target;
systemctl set-default graphical.target;

To switch from graphical to multi-user:
systemctl isolate multi-user.target;

To switch from multi-user to graphical:
systemctl isolate graphical.target;

iops OSX check

To determine the number of IOPS being utilized by Mac OS X, proceed with opening the Terminal App from / Applications / Utilities. Then proceed to type the following commands:
  • mount
    • This will determine which disk to get the IOPS data on, in this example, since I want to view the IOPS on the iSCSI Target, the disk target name is /dev/disk1s2
  • iostat –d disk1 1
    • “iostat” is the name of the program used to gather IOPS data
    • “-d” will display device utilization
    • “disk1″ is the disk that is to be examined
    • “1” is the interval, meaning, report every 1 second

KNOW YOUR INTERNET BROWSER SHORTCUTS

There are dozens of different shortcut keys that can be used with Internet browsers. Below are a few of our top suggested Internet browser shortcuts.
- Pressing Alt + D in any major Internet browser will move the cursor into the address bar. This is a great way to quickly enter an Internet address without having to click the mouse cursor in the address bar.
- Hold down the Ctrl key and press the + or - to increase and decrease the size of text.
- Press the backspace key or hold down the Alt key + left arrow to go back a page.
- Press F5 to refresh or reload a web page.
- Press F11 to make the Internet browser screen full screen. Press F11 again to return back to the normal view.
- Press Ctrl + B to open your Internet bookmarks.
- Press Ctrl + F to open the find box in the browser to search for text within the web page you're looking at.

WINDOWS KEY AND THE ARROW KEYS


729-windows-key-wallpaper-1600x1200-customity.jpg
Pressing the Windows key and Left or Right arrow keys will dock the window your viewing to the left or right-hand side of the screen. Pressing the Windows key and the Up arrow will maximize a window and pressing the Windows key and the Down arrow will resize and then minimize the window.
Use Shift: To stretch a window vertically, press the Windows key + Shift + the Up arrow. If you have multiple monitors use the Windows key + Shift + the Left or Right arrow keys to move the window to another monitor.

BOOT EFI MEDIA

if your system has an EFI she'll and you want to boot from a shell to attached media, here is how.
1: Make sure the media with. EFI compatible OS is connected  to the system.
image.jpg
2: Boot to a EFI shell
3: # map -r (this will remap and display all attached media) 
4:  change location to the drive that contains your target OS. This ca be done by typing the name and partition number of the required mount. For example; # FS0: 
5: # ls to see the directory's contents
6: # cd to /EFI/boot  
7: this directory will contain 1 or more boot.efi files. Run the version you need by typing its name and extension 
TIP: EFI shells support tab completion 

MacBook Air Recovery

How to Restore a MacBook

There are lots of reasons to restore a laptop. The sale of a system, a fresh start, or the recovery from a Hard Drive issue, to name a few.

Macs running OS X Lion and newer versions of OS X include a recovery mode boot-up option. You can boot into the recovery environment, also known as “Lion Recovery,” by using a special key combination while your Mac is booting up. You can restore your MacBook Air to its factory default state using this mode; the MacBook Air downloads the required data from Apple and reinstalls Mac OS X on your computer. You can also restore your Mac from a Time Machine backup.

Step 1: Enter recovery Mode

Press the “Command” and “R” keys on your keyboard at the same time and hold them down until the Apple logo appears. A “Mac OS X Utilities” window appears after the Apple logo. If you don’t see the window, try restarting your MacBook Air and pressing the “Command” and “R” keys earlier in the boot process.

Step 2: Wifi

Connect to a wireless network by clicking the “Wi-Fi” icon at the top-right corner of your screen, selecting your wireless network and providing its password.

Step 3: Install

Click “Reinstall Mac OS X” in the Mac OS X Utilities window and click “Continue.”

Step 4: Choose your drive

Select your Mac’s internal hard drive by clicking it in the list that appears and click “Install.”

Step 6: Authenticate

Type your Apple ID and password for the Mac App Store into the boxes to confirm your eligibility. Your Mac downloads about 4 gigabytes of data from the Internet and restores Mac OS X to its original state.



If you do not see your Drive

If your Mac's hard drive isn't visible during the installation process, you will need to format the hard drive. (WARNING: THIS WILL ERASE THE DRVE)

Step 1: Disk utility

If the Installer is running, quit it and exit to the OSX Utilities Screen. Click Disk Utilities. 

Step 2: Format Drive

Select your drive from the column on the left. Next select the Partition dutton on the right. Under Volume Scheme, choose One Partition, the hit the apply button in the bottom right.

Step 3: Continue the restore

When the partitioning is complete, quit disk utility, and continue your OS restore.




Internet recover w/out Recovery Partition

If your hard drive has had a serious issue, been improperly formatted, or is brand new, you might not have a recovery partition.



Step 1: Boot

Boot the system holding down command + R

Step 2: Wifi

When the system boots, the middle of the screen will have a dropdown that will allow you to connect to the internet wirelessly. Do so.

Step 3: Restore

Follow the prompts and the system will download and configure the recovery environment. 



How to import bookmarks from Chrome to Safari

  1. Select 'Bookmark Manager' in Chrome
  2. Click Organize
  3. Select 'Export Bookmarks'
  4. Select File/Import Bookmarks in Safari

Here is a Chrome page about it:


excuteable shell scripts in OSX

How do I make this file.sh executable via double click?:

By default, *.sh files are opened in a text editor (Xcode or TextEdit). To create a shell script that will execute in Terminal when you open it, name it with the “command” extension, e.g., file.command. By default, these are sent to Terminal, which will execute the file as a shell script.
You will also need to ensure the file is executable, e.g.:
chmod +x file.command

How to make a Mavericks ISO

I've found a number of websites with instructions on creating a bootable USB for installing Mavericks, but an ISO is much more useful in my ESXi environment. Of course there's a 101+ ways to do this, the only requirement for this solution is a command line. You'll of course need to adjust the paths if necessary/desired.


# Mount the installer image
hdiutil attach /Applications/Install\ OS\ X\ Mavericks.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app

# Convert the boot image to a sparse bundle
hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/Mavericks

# Increase the sparse bundle capacity to accommodate the packages
hdiutil resize -size 8g /tmp/Mavericks.sparseimage

# Mount the sparse bundle for package addition
hdiutil attach /tmp/Mavericks.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build

# Remove Package link and replace with actual files
rm /Volumes/install_build/System/Installation/Packages
cp -rp /Volumes/install_app/Packages /Volumes/install_build/System/Installation/

# Unmount the installer image
hdiutil detach /Volumes/install_app

# Unmount the sparse bundle
hdiutil detach /Volumes/install_build

# Resize the partition in the sparse bundle to remove any free space
hdiutil resize -size `hdiutil resize -limits /tmp/Mavericks.sparseimage | tail -n 1 | awk '{ print $1 }'`b /tmp/Mavericks.sparseimage

# Convert the sparse bundle to ISO/CD master
hdiutil convert /tmp/Mavericks.sparseimage -format UDTO -o /tmp/Mavericks

# Remove the sparse bundle
rm /tmp/Mavericks.sparseimage

# Rename the ISO and move it to the desktop
mv /tmp/Mavericks.cdr ~/Desktop/Mavericks.iso

OSX: Disable Dashboard

Disabling dashboard will save wasted memory on your Mac.

Disable Dashboard: type the following into Terminal
defaults write com.apple.dashboard mcx-disabled -boolean YES
Reload the Dock:
killall Dock

Enabling Dashboard: type the following into Terminal
defaults write com.apple.dashboard mcx-disabled -boolean NO
Reload the Dock:
killall Dock


Linux: List specific hardware components

Situation: You would like to list all the installed hardware of a specific type in your computer.

Solution: lspci | grep -i Keyword

Examples:
1) lspci | grep -i Intel
2) lspci | grep -i Ethernet
3) lspci | grep -i Apple

The lspci command will list out all the PCI based hardware components.
The grep command will filter the results based on the keyword you provide
The -i modifier tells grep to ignore upper and lower cases so ethernet and Ethernet are the same.

Infinite loop IO test

I needed to test a system's disk stability so I made this script. It will copy the contents from one HD to the HD in question infinitely.


while true
do
echo "Today's date is $(date)"
        dd if=/dev/sdc of=/dev/sda
done


When you are done, just quit out of it.




OSX: Listing Disks in Terminal


To list all mounted drives and their accompanying partitions from the Terminal, type the following:

diskutil list

Linux: no password for root

Here is now to setup root to have no password. This is NOT recommended for normal use systems.

1) $ cd /etc/
2) $ vi passwd
3) Remove "x" from the root line
4) :wq! to save and quit
5)$ pwconv

This will remove the root password, aka SUPER unsecure.

Linux: Disk Duplication

To make an EXACT copy of one disk to another is easy with the command $ DD. This command will do a block by block copy of one source to another, partitions and all.


Here is what you need to do:

1) $ fdisk -l to see your drives
2) $ dd if=/path_to_your_source_drive/ of=/path_to_your_target_drive/ bs=4096k
      if = input file
     of = output file
     bs = block size
                  example: $ dd if=/dev/sdb of=/dev/sdc bs=4096k

Fixed: Images not showing up in Gmail


When you open new messages, some images may not show, or have links rather than the pics. 
To view them do the following:
  1. Sign in to Gmail.
  2. Open the message.
  3. Click Display images below in the green box above your message. Or, if you'd like to always view images from a particular sender, click Always display images from sender@domain.com instead.

Internet Explorer users: Your browser1 settings may prevent images that are being sent through HTTP from being shown within messages.
You may need to adjust Internet Explorer's mixed content settings to view images sent through HTTP by following the steps below. Please note to be cautious of enabling displays of HTTP content, as some sites may have risky or malicious content that the browser setting is trying to protect you from.
  1. Access Internet Explorer's Tools menu.
  2. Select 'Internet Options' and click the 'Security' tab.
  3. Select 'Custom level.'
  4. In the 'Display mixed content' section, select the 'Prompt' radio button so you can make the choice on a case by case basis.
Next time Internet Explorer pops up the warning about mixed content, you can choose whether or not you want the content that wasn't delivered via HTTP to be displayed. Browsers like Mozilla Firefox and Google Chrome may default to not showing you a pop-up in these cases, but will put a warning icon in the browser window as a notification of the non-HTTPS content that the site may contain.

Linux: Add a user to the sudo list

  1. Launch a terminal with root access.
  2. Type visudo (to open and edit the list)
  3. Scroll to the bottom of the sudoers list.
  4. After the line reading: root ALL=(ALL) ALL,   Type: user ALL=(ALL) ALL (put the username for "user")
  5. Now press Ctrl+X and press Y when promted to save

How to boot to the CLI in Fedora 17

A few versions back, Fedora stopped using the initab file. Here is the new method to set Fedora 17 to boot to a CLI rather than a GUI.

1) Remove the default.target, run the following command
# rm -f /etc/systemd/system/default.target

2) Set the system to boot into CLI, run the following command
#  ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target

3) Reboot

Linux: Manually Create Ethernet Ports

If you add a ethernet port to a Linux system and ifconfig doesn't show it, (ex: A usb ethernet device is plugged in ), this is how to create it by hand.

1) Connect the ethernet device.

2) In the CLI type lspci and look for your new device. you can use grep to narrow the list of devices
      EX:   # lspci | grep -i Ethernet

3) After you confirm its listed, cd to /etc/sysconfig/network-scripts and do a ls

4) cp  ifcfg-ethXX (where XX is the number of a network connect you want to clone) to ifcfg-eth?? (where ?? is the next number higher in the list of ifcg-eth's)

5) vi to your newly created ifcfg-eth?? file and remove the MAC and UUID lines.

6) Next rename the name of the port to match the file name then type :wq to write and quit.

7) at this point you can restart or type service network restart, then you are done.

How to change root's password using single user mode

If you somehow loose access to the root user you can quickly reset the password by rebooting to single user mode and running passwd. Here is how.

1) Reboot, and when GRUB is presenting the menu list (you might need to press ESC first), follow those instructions:
  • use the arrows to select the boot entry you want to modify.
  • press e to edit the entry
  • use the arrows to go to kernel line
  • press e to edit this entry
  • at the end of the line add the word single
  • press ESC to go back to the parent menu
  • press b to boot this kernel
2) You will now have root access. Type passwd and define a new root password.

3) Reboot and you are done.

Install Mountain Lion (OSX 10.8) on Multible Macs Without Buying Additional Copies

After you have purchased Mountain Lion in the Appstore 1 time, you get unlimited downloads and installs.

To install it on another computer the official way, simply create a new admin account on the computer and sign in to iTunes using an account that has already purchased Mountain Lion. Proceed with the install, then delete the created admin account when done.

SSH to your mac over iCloud

First you need to get your back to my mac account number. In terminal type the following:

dns-sd -E
 
The final nine digit number is your account number.

Make sure remote login is enabled in system prefs on the target computer.

To ssh in type the following:

ssh -2 -6 username@computer-name.[account number].members.btmm.icloud.com
  
If you don’t want to hard code your Back To My Mac address into your .ssh/config 
you can get it dynamically using this line:
echo show Setup:/Network/BackToMyMac | scutil | sed -n 's/.* : *\(.*\).$/\1/p'
 
Another way to SSH into another Mac using iCloud’s IPv6 network: in 
Terminal, choose ‘New Remote Connection’ from the Shell menu, or whack  +  + K. 

Broken SMB Sharing in Lion Server

I was not able to connect in any way form a windows XP box to a SMB (samba) share hosted on a 10.7 Server. /private/var/log/krb5kdc/kdc.log   showed the following:

2011-10-10T16:57:56 digest-request: init request
2011-10-10T16:57:56 digest-request: init return domain: BUILTIN server: IMGQA-DB
2011-10-10T16:57:56 digest-request: uid=0
2011-10-10T16:57:56 digest-request: user=IMGQA-DB\\qtqa
2011-10-10T16:57:56 NTLM domain not configured
2011-10-10T16:57:56 digest-request: kdc failed with 36150275 proto=unknown
2011-10-10T16:57:56 digest-request: guest failed with 22 proto=ntlmv1-with-v2-session

Here is the fix to this known bug:

sudo serveradmin stop smb

wait a few seconds

sudo serveradmin start smb

If you wish to scrip this you can do the following:

sudo su -
cd /System/Library/LaunchDaemons

cat > com.smb.restart_smb.plist <<@@EOF
    Label
    com.smb.restart_smb
    ProgramArguments
   
        /bin/bash
        -c
        sleep 60;serveradmin stop smb;sleep 5;serveradmin start smb
   
    RunAtLoad
   
@@EOF

launchctl load com.smb.restart_smb.plist

Enable debug mode in disk utillity


There're several reasons why you want to enable the debug mode in disk utility. The primary of which is to be able to see and manipulate all of the partitions currently installed on your drives.  Here's how you do it:

1. Open up terminal and type the following: sudo defaults write com.apple.DiskUtility DUDebugMenuEnabled 1

2. Restart Disk Utility if its open.

3. You now how the debug drop down menu


Keep in mind that editing hidden partitions may not be a good idea in most situations. The GUID partition scheme that OS X uses always will have a hidden 200MB "EFI" partition as the first partition on the drive (s1), which is used to manage the drive and its partitions in systems with EFI firmware (which is what all Intel Macs use). Beyond this, the OS X 10.7 Recovery partition is also required for managing the new version of FileVault, so if you edit this partition on a FileVault-enabled volume then you may break the encryption keys stored on it and not be able to boot your system or read any data from it.

Audible.com Files not syncing

I recently rebuilt my Mac and copied out my iTunes folder to an external and back onto the newly rebuilt computer.

 I didn't want to migrate my keychain db for more of a "clean slate" experience. Everything works great the only exception was I'm a huge consumer of audible.com audiobooks and they didn't want to sync to my iPhone anymore.

The message I was getting was my computer was not authorized to play these files so they would not sync my iPhone. The solution was easy, all you have to do is double-click on an audible file inside iTunes and it will prompt you to reenter your audible.com or now Amazon.com authentication credentials once that's done everything works.

Embedded system info in the background.


Here’s what you do:
  • Install GeekTool
  • Paste the following ruby code into a text file and save it somewhere like ~/scripts or ~/Library/Scripts as sys_info.rb:
@user = `whoami`
@system = `scutil --get ComputerName`
@ip = (`ifconfig en0 | grep netmask`).split
@vers = (`sw_vers | grep ProductVersion`).split
@hw_info = `system_profiler`
@up = (`uptime`).split(',')
if @vers[1].include?('10.5')
  @hw_name = 'Processor Name'
  @hw_speed = 'Processor Speed'
else
  @hw_name = 'CPU Type'
  @hw_speed = 'CPU Speed'
end
puts "User: #{@user}"
puts "Computer: #{@system}"
puts "IP: #{@ip[1]}"
puts "OS Version: #{@vers[1]}"
puts @hw_info.grep(/#{@hw_name}/).to_s.strip
puts @hw_info.grep(/#{@hw_speed}/)[0].to_s.strip
puts @hw_info.grep(/Memory:/)[0].to_s.strip
puts "Uptime: #{@up[0].strip}"

  • In the Command box, enter: ruby ~/scripts/sys_info.rb (change to your path and file name)Open the GeekTool preference pane and add a new entry. Select Shell from the pop-up menu.
  • Set the refresh for 300
  • Now you should see a box somewhere on your desktop and it should have 8 lines of juicy info.
  • Play with the other tabs to set the font style and background.
  • You can drag and resize the box to wherever you like.
I know this works on OS X Tiger and Leopard and it should work fine on Panther. BTW – GeekTool works great on Leopard.
If you have any suggestions, changes or additions to this, please share.