Sunday, March 29, 2015

Disable CPU Throttling in Mac OSX


Adjusting the speed of the CPU also called "dynamic frequency scaling", CPU throttling is commonly used to slow down the computer whenever possible to use less energy and conserve battery. It is also used to make the system quieter, but slower. The below will force all the CPU cores in Mac to be online:


  • Enable Root user
    • System Preferences
    • Users & Groups
    • Login Options
    • Network Account Server: Join
    • Open Directory Utility
    • Edit -> Enable Root User
  • Open Terminal
    • Execute:
      • su - root
      • nano /Library/Preferences/SystemConfiguration/com.apple.Boot.plist
      • add the following string
        • <string>idlehalt=0</string>
      • Exist and Save
  • Reboot

Tuesday, February 10, 2015

Import eMails & Mailbox From Apple Mail to Microsoft Outlook 2011 OSX


It’s not currently possible to export mailboxes from Apple Mail.app to something that Microsoft Outlook 2011 can import directly. Here’s a way to fix it, for FREE!!!

The issue is due to the FSTypeCode not being set by Apple Mail.app, which is actually really easy to fix.

First, in Mail.app, export the mailbox(s) you want to import in Microsoft Outlook 2011.

In my case, after I select my Archive mailbox, I get:
$ ls -1 Inbox2007.mbox

The Apple mbox format is actually a folder that contains a few files inside:
$ ls -1 Inbox2007.mbox Info.plist
mbox
table_of_contents


Where mbox is the real mbox and only tfile we need to import into Outlook, but if we try now (Import -> Contacts or messages from a text file -> Import messages from an MBOX-format text file) we’ll see the mbox file in the Finder is greyed out. This is because the FSTypeCode is not set:
$ mdls Inbox2007.mbox/mbox | grep 'FSTypeCode' kMDItemFSTypeCode = ""

What we need to do is to change the code to TEXT. We can do this with a simple command (I used find since I exported several mboxes at once):
$ find . -name '*.mbox' -exec SetFile -t 'TEXT' {}/mbox \; -print ./Inbox2007.mbox

If we now test for the FSTypeCode, we verify it’s correctly set as TEXT
$ mdls Inbox2007.mbox/mbox | grep 'FSTypeCode'
kMDItemFSTypeCode = "TEXT"

We can now finally go back to Outlook and import the mbox file: Import - > Contacts or messages from a text file -> Import messages from an MBOX-format text file.

Thats it!!!


Search Keywords:
Import Apple Mail Mail.app eMail eMails Microsoft Outlook 2011 OSX Mac Lion Mountain Yosemite 

i-tweak@hotmail.com

Friday, February 6, 2015

STC Bands

All Bands:
1 (2100 MHz) STC
2 (1900 MHz)
3 (1800 MHz) STC
4 (AWS)
5 (850 MHz)

7 (2600 MHz)

8 (900 MHz)
13 (700c MHz)
17 (700b MHz)
18 (800 MHz)
19 (800 MHz)
20 (800 DD)
25 (1900 MHz)
26 (800 MHz)
28 (700 APT MHz)
29 (700 de MHz)


Samsung S5 LTE-A @ 2100 (Band 1) on STC

Wednesday, January 28, 2015

25 Hidden Nexus 5 Features

The past few months have been exciting for Android fans with the release of Google’s flagship Nexus 5 smartphone running Android 4.4 KitKat, and as a result we have plenty of new features and tricks worth sharing.
The Nexus 5 is an extremely powerful device all for a great price, making it one of the most popular Nexus smartphones to date. With so many buyers enjoying the new smartphone you’re probably wondering if there’s some tips, tricks, or hidden features under that stock version of Android 4.4.2 KitKat.
With a new Google experience launcher and tons of little features hidden under settings menus, quick toggles, long press combinations and more you’ll be happy to know we’ve uncovered 25 hidden features you all should know about. Many may be obvious to some, but the vast majority of consumers could go months, if not a year using the device without unearthing some of these.
Google's Nexus 5 flagship smartphone
Google’s Nexus 5 flagship smartphone
You won’t have to root (Android’s version of Jailbreak) your smartphone, flash custom software or ROMs, or even download apps. All these features and tricks are right on the device out of the box, and will make using the Nexus 5 and KitKat that much more enjoyable.
Here are 25 features for the Nexus 5 the Gotta Be Mobile staff has enjoyed after a few months of using Google’s flagship smartphone. It took longer than expected, but read on to learn something new.

Lockscreen

The lockscreen is as powerful as ever in Android 4.4 KitKat and as a result there’s tons of options for widgets, quick access to Google Now, quick launch for the camera, and even music controls all like never before. The first thing you see when you hit the power button is the lockscreen, so here’s a few things you can do without even unlocking your device.

Lockscreen Widgets

For security reasons lockscreen widgets are disabled out of the box, because users can have Gmail info in widgets, calendar details, and other sensitive information. Go ahead and enable lockscreen widgets, then add clocks, Gmail notifications, calender widgets, SoundHound music search and more all to your lockscreen. Enabling tons of features without ever unlocking your device.
Settings > Security > Enable Widgets (second option) and that’s it. All set!

DashClock is an app on the Play Store full of extensions and features for the lockscreen widgets, and many app developers have updated their apps with support for lockscreen widgets. Tap the add (+) button and throw whatever you’d like on that screen, then long press and drag to rearrange or remove.

Lockscreen Camera & Music Controls

With previous versions of Android sliding from right to left on the lockscreen would quickly access the camera, which is one of my favorite features, but many users didn’t know about it. With KitKat and the Nexus 5 it’s still available, but there’s also a dedicated camera button on the bottom left of the lockscreen to remind you.

As you saw above, a simple swipe from anywhere on the right side will quick-launch the camera app, or you can drag the camera icon to the left and get right into shooting photos with the 8 megapixel camera.
Then, the lockscreen music controls have been enhanced. You’ll now get fullscreen album art as you see in the video above, but there’s a little hidden feature. Long press the Pause button and the forward and back controls disappear and become a slider, allowing users to seek through songs with speed and precision. The more you know!

HDR Camera

Speaking of the camera, the Nexus 5 has an 8 megapixel shooter with optical image stabilization. Overall the camera is quite good, but only excels in an environment with good lighting. If you aren’t snapping photos of a moving object or an action-shot, enable HDR mode in settings for the best photo experience.
HDRcamera
HDR (High Dynamic Range) photography with the Nexus 5 takes two photos. One with a high exposure and one with a lower, then combines the two giving you the shadows, and brights all in one better photo than you’d get with regular options. This is the only way I use my camera, unless I’m taking action shots.

Photos While Recording

Another neat feature that many don’t know about, that’s so simple we don’t need a video to explain, is taking photos while recording video. On the Nexus 5 and most stock Android 4.4 KitKat devices you can easily snap photos while recording a video.
recordphoto
While recording video simply tap the screen and it will automatically take a photo and add it to your gallery. It’s the same high resolution as most photos, and will likely be in perfect focus. This is a quick way to snap photos while also recording a special moment.

Lockscreen Google Now

Before we get away from the lockscreen we have to talk about Google Now. Google’s search app (Google Now) is the most powerful feature of Android, and does so many things that’s another story all-together. However, to quickly access Google Now right from your lockscreen to search for a nearby store, look up directions, ask Google a question, and anything else here’s how to do it quickly.
lockscreen-now
There’s a small arrow on the bottom middle of the lockscreen, something that replaced an odd circle in previous versions of Android. This little icon is a reminder that a quick slide up from the bottom edge will launch Google Now. It’s that easy. Now right from the lockscreen say “Ok Google” (which fires up voice controls) and search for whatever you’d like. Try saying, “Ok Google, Go to GottaBeMobile.com”

Turn Off Google Now

Google Now is a powerful tool that I’d never live without now that Google’s integrated it into Android. We’re not sure why anyone would ever want to disable Google Now, but if you’d like to, here’s how.
disable-now
Open Google Now with the quick setting above, or swipe to the left and enter Google Now on the Nexus 5. Scroll to the bottom and tap the three dots on the bottom left (menu) > tap settings > and simply tap the On/Off switch at the top to disable Google Now.

Wireless Charging

Unlike some smartphones that require a secondary battery cover or unique case that’s expensive, the Nexus 5 has wireless QI charging built-in. This enables users to buy a wireless charging dock (like Google’s own Nexus Charger) and simply drop the phone on to charge without hassling with cables. It’s a drop and go system.

This can be yours for just $49 right from the Google Play Store.

Smart Dialer & Caller ID

With Android 4.4 KitKat Google changed the dialer and phone app completely. While I’m not a fan of the redesign and confusion with finding call history, everything else about the new dialer is awesome. Google Search and caller ID is essentially built-in with KitKat and the Nexus 5.
dialer
Instead of a number start typing a business name and Google Search finds it for you, nearest to your location, and you can call it within seconds. There’s no need for the yellow pages. Then, if possible it will even pull up location information, and an image from the web if available. Anything from the Post Office, Best Buy, to a nearby Restaurant and more. It’s the little things that make a difference, and this is one of them.

Hangouts & Default SMS App

With Android 4.4 KitKat Google Hangouts is now the new default text message app instead of Messenger. As a result all your online chats and texts and combined into one. Many love this new option, but with hundreds of customizable 3rd party SMS apps for Android you may want to disable it. I use Textra, but Chomp SMS, Evolve SMS, and Handcent are all popular alternatives.
disable-hangout
In Settings > Wireless & Networks tap more, then the second option listed as “default SMS app” is where you’ll be able to quickly toggle from Hangouts, Handcent, GO SMS, or any other text message application of choice. Disable Hangouts as the stock SMS app, and use something else more customizable.

Supercharge the Keyboard

You can count this as one hidden feature or trick, but below is a video showing you five tips to type faster on Android using the stock Google Keyboard found on the Nexus 5. Things like gesture typing, next-word suggestions, and even text expansion support all can make you faster when it comes to typing on a smartphone.

There’s tons of little tricks and features hidden inside Google’s keyboard that will make you a faster typist on a keyboard. I disable next word prediction as it’s too intrusive, but the video above should give you plenty of ideas.

Disable Blocking Offense Words

Google disables swearing when you use Google voice-to-text features, and the stock keyboard won’t suggest curse words. As a result, here’s how to swear on Android. You’ll want to uncheck the “block offense words” in the Google keyboard settings from the video above or image below, and the same goes for Google Now voice controls.
swear-android
Head into Google Now (if you didn’t disable it as shown above) and tap settings > voice > and also uncheck the block offense words feature here. This will allow swearing to go through with voice-to-text instead of getting a S*** or other stars in the way of letters.

Take A Screenshot

Sometimes you want to share what’s on your screen with others. Whether that be a hilarious text message you received, an auto-correct fail like we all see on Buzzfeed, or even sharing a small excerpt from an email. You can tap a few key commands and instantly capture a screenshot of exactly what’s on your display.
Simply long-press volume down and the power button at the exact same time. Slightly longer than a tap and then release, and it instantly captures the screen. Then the notification pulldown bar shows its been saved and you can instantly share it with Android’s built-in share feature.

Quick Settings Tricks & Toggles

When you pull down from the top of the screen you get what’s called the notification drawer. This shows the date and time, lets you clear notifications, and even access a quick settings menu. The grid-looking button on the top right is Quick Settings, but there’s a few other things you can do here.

Pulling down with one finger opens the notification tray, pulling down with two fingers instantly launches the quick settings menu. Here you can access your Google account, change settings and brightness on the fly, check battery stats, and even toggle WiFi on and off in a matter of seconds. The video above shows this, as well as how you can long press WiFi, Bluetooth, or Airplane mode to instantly turn it on/off, rather than heading into that particular setting with a single tap.

Enable Developer Options

Developer options is a hidden menu that Google’s completely removed so average users don’t mess with important system settings. However, there’s a few things many users need from this menu, including the setting to enable USB debugging for things like using the Nexus 5 as a hotspot, which we’ll explain further down, so here’s how to enable developer options.
dev-menu
Tap settings and scroll down to about phone, and at the very bottom you’ll see the Android build number. Tap the build number quickly seven (7) times. Weird we know. You’ll get a prompt after a few saying you’re close, and after seven taps the developer menu will appear back in the original settings menu, just above the “About phone” menu you were just in.

ART Runtime

ART is a new feature that’s coming soon and still in the testing phases by Google in Android 4.4 that stands for Android Runtime. It’s the new runtime that will replace Dalvik, which is a bit technical for average users. Essentially dalvik runs the code and launches an app as it’s needed, each time, and ART does it ahead of time, which makes your phone faster and more smooth. This is a very vanilla explanation, but lets just say in the future it will make all Android devices much faster. Here’s how to enable this test feature (which could be unstable for some apps) if you’d like.
ART
In the newly discovered developer options mentioned above the fourth option is “Select Runtime” which is where you can go from Dalvik to ART. Your phone will reboot, probably take 10-20 minutes to compile and prepare all your apps, and then restart. Performance should be better, as should battery life.

Improve Nexus 5 Battery Life

ART brings us to another topic, improving the Nexus 5 battery life. Everything from screen brightness and sleep times, WiFi and Bluetooth, Location services and GPS, and much more is all explained in the link above.
location-gps
Changing the location and GPS services is a new feature in Android 4.4 KitKat that is hidden to most. Head into that through settings > location > and select battery saving as shown above. Or select high accuracy if you use Google Maps and navigation daily, but this may lower battery life.

Enable 3rd Party App Installs

While it’s recommended you download and install apps ONLY from the Google Play Store, there’s other safe areas users can get apps and games for Android. The Amazon AppStore is one, not to mention some users may get app APK install files from friends, while beta testing apps, or for 3rd party keyboards, and you’ll need to enable the phone to install apps from unknown sources. This is a security feature you can disable if you need to.

Again head to Settings > Security > and tap “Unknown sources” which will allow the phone to download apps that aren’t directly from the Google Play Store. Remember to use caution and be smart with what you install, and where you get it.

Multitasking

This is a simple one that’s right in every users face, but some people don’t use this extremely powerful tool. The Nexus 5 on-screen keys are back, home, and two squares that is multitasking! This shows you all the previously opened apps, and lets you switch back and forth with ease.
multitask-nexus5
It saves your place, so if you leave an app and return nothing is lost. You’re right where you were, and I use this daily to improve my experience and be more efficient. This is absolutely nothing new to Android, but with an awesome Nexus 5 being only $349 many newcomers to Android have one, and will love the multitasking feature.

Add & Remove Home Screens

This is another one that should be self explanatory, but with the Nexus 5 running Google’s “experience launcher” adding new home screens is different than before. Out of the box there’s only Google Now to the left, and one screen to the right with some Google apps, Gmail, YouTube, and Google Music. You’ll want another screen to the side with more apps, widgets, and other things so here’s how to add and remove them.

Sadly there’s no easy way to remove an entire home screen. And you’ll have to seriously remove each app icon and widget until there’s none left, and then that screen will disappear. Google will likely address this in Android 4.4.3 KitKat, or 4.5, but for now this is the only way unless you use a custom launcher like Nova.

Use the Nexus 5 as a Hotspot

Many smartphone owners don’t know they can use their smartphone as a hotspot, essentially sharing the internet and data connection to a tablet or a laptop. Just like you sign into WiFi at Starbucks or a hotel, you can make your phone transmit its connection for nearby devices.
Nexus5-hotspot
You’ll want to head into Settings > More (under wireless & networks) > Tethering & portable hotspot and hit enable. This will share the internet and data connection like a wireless network, but make sure you configure it first and secure the connection with a password, otherwise others at the park on on a bus ride can use it too. For a full rundown you’ll want to check out the How to guide below.

KitKat Easter Egg

Last but certainly not least is a little hidden trick, but not necessarily a feature. In every version of Android if you quick tap the Android version in the phone settings you’ll get a hidden graphic or treat from Google. KitKat has a spinning K that you can long press to see a huge red Android 4.4 KitKat splash screen, but we can take it one step further.

Tap that again and as you see in the video above Google’s hidden a mosaic of sorts showing an icon or graphic of every version of Android. There’s donuts, cupcake, eclair, honeycomb, jelly bean, and all the other fun dessert names of Android. Tap around to have some fun with it. There’s no added value, but it’s still fun to play around with.
We hope you enjoyed the many new tricks and features detailed here today, and check out our review after owning Google’s device for over a month below.

Fix OSX Yosemite Wi-Fi Issues with a Terminal Command

Fix Yosemite Wi-Fi Issues with a Terminal Command

OS X Yosemite has had a slew of issues with Wi-Fi, namely that connections are randomly dropping out or slowing down. If you're affected by this, developer Mario Ciabarra has a Terminal command that'll fix the issue.

The problem seems to stem from how Yosemite handles its Wi-Fi connection with AirDrop using a connection called AWDL. So, as you'd guess, the solution is to disable it. You can do so in Yosemite with a Terminal command:
                     sudo ifconfig awdl0 down

That should fix up your Wi-Fi issues, although it'll also disable AirDrop.

Friday, September 5, 2014

Install Google Chrome Without Google's Pushy Updater (Standalone)

Google has gotten in the bad habit lately of requiring you to install Google Updater to download any of its desktop apps, but if you're not keen on the required Updater install (and want to try Chrome), try the Google Chrome Standalone installer.

It downloads a full offline installation package for Chrome. The downside: It won't automatically update when Google Updater pushes out new versions of Chrome. But don't worry, we'll keep you updated

Link: Google Chrome Standalone Installer

Sunday, February 23, 2014

Rooted Android Phones: Force All CPUs Active

Open Terminal Emulator, execute [For example on a quad core]:

!Get Root Acces
#su

!Read CPU information 
#cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
#cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
#cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
#cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq
#cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq

!Make the files writable
#chmod 666 /sys/devices/system/cpu/cpu0/online
#chmod 666 /sys/devices/system/cpu/cpu1/online
#chmod 666 /sys/devices/system/cpu/cpu2/online
#chmod 666 /sys/devices/system/cpu/cpu3/online
#chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

!Set online status to 1 and make the files readonly
#echo 1 > /sys/devices/system/cpu/cpu0/online && chmod 444 /sys/devices/system/cpu/cpu0/online

#echo 1 > /sys/devices/system/cpu/cpu1/online && chmod 444 /sys/devices/system/cpu/cpu1/online

#echo 1 > /sys/devices/system/cpu/cpu2/online && chmod 444 /sys/devices/system/cpu/cpu2/online

#echo 1 > /sys/devices/system/cpu/cpu3/online && chmod 444 /sys/devices/system/cpu/cpu3/online

!Set CPU scaling to interactive and make the file readonly
#echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor && chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor


Good Luck.

Apple Mac Cleaning Utilities

There are many Apple Mac cleaning utilities out there. I have used some of them, out of testing, and I'm listing the ones I like in the order which I liked:


  • OnyX.app
  • Yasu
  • Cache Out X.app
  • MainMenu Pro.app
  • Trash It!.app
  • CleanMyMac.app
  • Lion Cache Cleaner.app
  • TinkerTool.app
  • iTweaX.app

Rooted Android Phones: Force All CPUs Active

Open Terminal Emulator, execute [For example on a quad core]:

!Get Root Acces
#su

!Read CPU information 
#cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
#cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
#cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
#cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq
#cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq

!Make the files writable
#chmod 666 /sys/devices/system/cpu/cpu0/online
#chmod 666 /sys/devices/system/cpu/cpu1/online
#chmod 666 /sys/devices/system/cpu/cpu2/online
#chmod 666 /sys/devices/system/cpu/cpu3/online
#chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

!Set online status to 1 and make the files readonly
#echo 1 > /sys/devices/system/cpu/cpu0/online && chmod 444 /sys/devices/system/cpu/cpu0/online

#echo 1 > /sys/devices/system/cpu/cpu1/online && chmod 444 /sys/devices/system/cpu/cpu1/online

#echo 1 > /sys/devices/system/cpu/cpu2/online && chmod 444 /sys/devices/system/cpu/cpu2/online

#echo 1 > /sys/devices/system/cpu/cpu3/online && chmod 444 /sys/devices/system/cpu/cpu3/online

!Set CPU scaling to interactive and make the file readonly
#echo interactive > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor && chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor


Good Luck.

Wednesday, February 5, 2014

Organize Things On OSX With Symbolic Links

If you want to move for example your Downloads folder to another drive, you can use Symbolic links to do that and organize your folders. Here is how:


  1. Ensure that you are working within your home folder, type
    cd
  2. Move the Downloads folder to your second drive, replacing Data (the name of my second drive) with whatever yours is called. You may be prompted for your OS X password.
    sudo mv ~/Downloads /Volumes/Data/Downloads
  3. Create a symlink to allow you to access your new Downloads folder in the old location. Again, replace Data with the name of your second drive.
    ln -s /Volumes/Data/Downloads ~/Downloads

Saturday, February 1, 2014

Speed Up Apple MacBook/Pro CPUs (Disable Throttling) and Overall Performance via EFI Settings


The below are command combinations I've tested and have found to speed up any MacBook/Pro (x86). Execute each line from the terminal then reboot.

Boot Args

sudo nvram boot-args="arch=x86_64"
Allows Mac OS X to boot into 64-bit mode. Mac OS X Snow Leopard (and all versions beyond it) will boot into 64-bit mode by default. Nowadays, this boot flag is mainly used on AMD Hackintoshes, where choosing between 32-bit mode and 64-bit mode is actually important.

sudo nvram boot-args="idlehalt=0"
Setting idlehalt=0 causes the kernel to stop halting a CPU core if no other thread in that core is active, idlehalt=1 causes the core to go into a low-power mode. An x86-only argument.


sudo nvram boot-args="UseKernelCache=Yes"
Mac OS X Lion and Mountain Lion can use the kernel cache to install kexts, allowing Mac OS X to boot faster. However, the kernel cache is turned off by default, and you have to enable it by using the boot flag "UseKernelCache=Yes" (without quotation marks). Installing Easybeast or UserDSDT with Multibeast will automatically turn the kernel cache on for you. If Mac OS X is booting extremely slow on your Hackintosh, the kernel cache might be malfunctioning. In addition, some laptops have trouble with the kernel cache feature. In these cases, you can turn the cache off with "UseKernelCache=No" (without quotation marks). Turning off the kernel cache is equivalent to using the "-f" bootflag in Snow Leopard.

sudo nvram boot-args="darkwake=0"
The DarkWake feature in Mac OS X Lion and Mountain Lion allows you to wake up certain parts of your Mac from sleep, while leaving other parts in sleep mode. Unfortunately, this feature often messes up sleep on Hackintoshes. Enter this bootflag to turn it off (enter darkwake=1 to turn it on, if turning it off doesn't do the trick). Additionally, if your verbose bootup is freezing at a bunch of commands that mention "SleepEnabler.kext", entering darkwake=0 should be able to turn SleepEnabler.kext off. (Once you boot into OS X, be sure to remove SleepEnabler.kext completely by deleting it from either /Extra/Extensions or /System/Library/Extensions in your hard drive.)


Thursday, January 23, 2014

Using the OS X Terminal instead of the Finder to copy files effectively

The Finder's abilities to copy files is usually adequate, but sometimes when managing large data transfers it can introduce some burdensome quirks.

While in OS X people often copy individual files or small groups of files between locations using the Finder, there are times when you might copy hundreds if not thousands of files at a time, especially for the purposes of backing up or migrating data from one drive to another. For the most part, the Finder's copying process is perfectly adequate for moving these files; unfortunately it does have some drawbacks that can hinder the copying process.

When the Finder copies files, it first catalogs all files to be copied and then treats the copy process as one all-or-nothing copy routine. Because of this, if you copy multiple files and there is an error in accessing one, then the system will cancel the entire process and revert the system to its state before the files were moved. This setup is good from some standpoints since it ensures that all files were copied properly; however, it can be frustrating if you are trying to recover as many files as possible from one location such as a hard drive with bad sectors.

One approach to overcoming errors that prevent a full copy process is to copy in smaller batches, but this can be time-consuming and impede on organization. Another approach that may be more successful is to use the OS X Terminal to perform the copy. There are several commands that can be used to copy files from one location to the next in the Terminal, and using them is fairly straightforward.

First ensure that you have both the source files and your copy destination mounted and available on your system so you can see them in the Finder. Then open the OS X Terminal and perform the following steps:

1. Enter your copy command and options.
There are many commands that can copy files, but the three most common ones are "cp" (copy), "rsync" (remote sync), and "ditto." As with any terminal command, each of these is a separate program that can take optional flags to tailor its behaviors for your needs, such as allowing it to preserve permissions on the copied files, or allow it to copy recursively into directories, and so on. These options can be looked up in the manual pages for each program, which can be done by typing "man cp" or "man ditto" in a Terminal window (or doing a Google search), but for most purposes the following options should be adequate:

cp -av

rsync -av

ditto -v

2. Specify your source files
With one of the above commands and flags typed, continue by typing a single space and then drag the parent folder of your source files to the Terminal window. When you do this the full path to the folder will be input at the cursor along with a single space. Remove this space by pressing the delete key once, and then type "/*" to tell the command to specify all items within the parent folder (otherwise the parent folder itself will be the target). At this point the command should look similar to the following:

rsync -av /path/to/source/*

3. Specify your destination folder
After you have entered the slash and asterisk characters, enter a space and then locate the folder where you would like to copy the files and drag it to the Terminal window. As with the source folder this should enter the full path to the destination folder. This time instead of adding a slash and an asterisk to the end, only add a single slash so the command looks like the following:

rsync -av /path/to/source/* /path/to/destination/

This command now tells the computer to run the "rsync" command (or other copy command you've chosen), and use the "a" and "v" options for this command (in this case they are for "archiving" and "verbose" mode to ensure all files are copied as-is and list them as they are being copied). It then tells the system to target all files within the source directory and put them within the destination directory. At this point, pressing Enter will run the command, and copy the files.

Unlike the Finder's copy process, if an error occurs, then these commands will leave the successfully copied files and likely output a warning or other reason why the error occurred, and also provide an active list of the files that were copied so you can both determine what was successful and what caused any errors, and be able to address the problem only for the faulty files instead of having to copy everything over and over again.

Wednesday, January 22, 2014

Blocking Unwanted Connections To Ad Sites In OSX

The Internet as is sucks big time! You have Ad sites violating your privacy and trying to track your WWW behavior to profile you. You can use your built-in OSX Hosts file to make the Internet not Suck as much. But more importantly, protect your identity and privacy and speed up your browsing noticably. Here is how:

Step 1 – Download hosts-file from mvps.org

download hosts-file from http://winhelp2002.mvps.org/hosts.zip

Step 2 – unzip host-file

double-click on the downloaded file hosts.zip

Step 3 – become root

open a terminal and type:
$su - administrator
$su - root¹
(Launch the Directory Utility and enable root in the edit menu - http://support.apple.com/kb/ht1528)

Step 4 – replace current host-file

first it's a good idea to backup your current hosts-file:
#cp /private/etc/hosts /private/etc/hosts.sik
#cat [location of your unziped hosts-file]/hosts > /private/etc/hosts

Step 5 – Flush the DNS cache

flush the DNS cache, and have your host file changes to take immediate effect:
#dscacheutil -flushcache; exit
 

Tuesday, January 21, 2014

Display Running Services Only On Mac

Open Terminal, Execute:
launchctl list | grep -v '^-'

Saturday, October 19, 2013

Google News Search parameters (The Missing Manual)

There is a severe lack of documentation of Google News Search’s query parameters. Here is the most comprehensive list I am aware of. A number of these overlap with Google Search’s query parameters. I exclude any Google Search parameters that don’t make sense in the context of Google News Search. These parameters are primarily of interest to anyone querying Google News for articles using its RSS and Atom output formats.

Search

The following query parameters control Google’s interpretation of keywords. Although as_epqmay be attractive for some use cases, it breaks sorting by date (scoring=n) when output is “rss” or “atom”, so stick with q for consistent sorting. Update: It seems the as_* parameters don’t work when output is “rss” or “atom”.
  • q=TERMS retrieve results with all of the terms. Alias: as_q
  • as_epq=TERMS retrieve results with the exact phrase
  • as_oq=TERMS retrieve results with at least one of the words
  • as_eq=TERMS retrieve results without the terms
  • as_qdr=dTERMS retrieve results within specified number of days example &as_qdr=d1 results within one day
  • as_qdr=wTERMS retrieve results within specified number of weeks example &as_qdr=w1 results within one week
  • as_qdr=yTERMS retrieve results within specified number of years example &as_qdr=y1 results within one year
  • as_occt=SECTION retrieve results where my terms occur…
    • any anywhere in the article
    • title in the headline of the article (same as using “allintitle:” in q)
    • body in the body of the article (same as using “allintext:” in q)
    • url in the URL of the article (same as using “allinurl:” in q)

Filter

The following query parameters filter results by Google News edition, topic, location, date, news source or author.
  • ned=EDITION limits results to a specific edition. Possible values: editions
  • topic=TOPIC limits results to a specific topic. Possible values: topics
  • geo=LOCATION limits results to a specific location
    • detect_metro_area determines location based on IP
    • a city, state, country, or US zip code
  • as_drrb=q retrieves articles added by Google News…
    • as_qdr=a anytime
    • as_qdr=h last hour
    • as_qdr=d last day
    • as_qdr=w past week
    • as_qdr=m past month
    • as_qdr=y past year
  • as_drrb=b retrieves articles added by Google News between…
    • as_minm=NUM minimum month. Possible values: [1, 12]
    • as_mind=NUM minimum day. Possible values: [1, 31]
    • as_maxm=NUM maximum month. Possible values: [1, 12]
    • as_maxd=NUM maximum day. Possible values: [1, 31]
  • as_nsrc=SOURCE limits results to a specific news source (same as using “source:” in q)
  • as_nloc=LOCATION limits results to news sources from a specific location (same as using “location:” in q)
  • as_author limits results to a specific author (same as using “author:” in q)
The as_ddrb family of parameters is occasionally set using the tbs parameter when using the web interface. You do not need to learn the tbs syntax. Note that as_nloc and geo are not synonymous.

Boost

I’m not confident that these parameters do anything when output is “rss” or “atom”, but here they are for completeness.
  • gl=COUNTRY boosts search results from a specific country of origin. Possible values:country codes
  • gll=LATITUDE,LONGITUDE boosts search results near that point. Latitude and longitude must be integer microdegrees. In otherwords, multiply each number by a million and round to the nearest integer.
  • gr=REGION boosts search results from a specific region. Possible values: province codes
  • gm=METRO boosts search results from a specific metropolitan area. Possible values: metro codes
  • gpc=ZIPCODE boosts search results from a specific zip code. gl must be “us”.
  • gcs=CITY boosts search results from a specific city. Possible values: city names in theUnited States and worldwide

Order

  • scoring=ORDER sorts search results. Default: “r”. Alias: “as_scoring”
    • "r" by relevance
    • "n" by date (newest first)
    • "d" by date (newest first) with duplicates
    • "o" by date (oldest first)

Paginate

  • num=NUM retrieves NUM results. Default: 10. Possible values: if q present [1,100], otherwise [1, 30]
  • start=OFFSET retrieves results starting from OFFSET. NUM plus OFFSET must be less than 1000, otherwise you will get zero results. Ignored if output is “rss” or “atom”. Default: 0. Requires q.

Output

  • output=FORMAT sets the output format
    • rss retrieves RSS feed
    • atom retrieves Atom feed
  • hl=LANGUAGE sets host language. Default: “us”. Possible values: languages
  • hdlOnly=1 displays headlines only
  • qsid=ID used in combination with cf=qUpdate: This feature has been removed.
In older versions of Google News, it was possible to change the output of the web interface using a cf parameters. It no longer seems to work, but it is here for completeness. Note that when output is set to “rss” or “atom”, this parameter is in fact ignored.
  • cf=CODE
    • all retrieve any content
    • q retrieve only quotes. Requires qsidUpdate: This feature has been removed.
    • i retrieve only images
    • b retrieve only blogs

Google tracking

Google uses parameters to track how users are using the web interface, which may include aq,authuserbtnmeta_news_searchedchangedclientrlsoioqresnumsasource,sourceidswrnumtab. You don’t need to worry about these, unless you want to bias Google’s internal statistics on user behavior.

Google Search

If using the web interface, performing a keyword search from Google News will redirect you to a Google Search page. The tbm=nws query parameter informs Google to display news results only.

Undocumented

I haven’t yet figured out what these do, but their impact seems minimal. If you have a clue, please mention it in the comments!
  • pz is usually set to 1. Default: 1. Possible values: [0, 1]
  • ict Possible values: “ln”, “itn0”, “tnv0”
  • csid

Deprecated

The following parameters work only on the deprecated Google News Search API.
  • v=1.0 sets the API version. Possible values: “1.0”
  • rsz=SIZE sets results size
    • small retrieves four results
    • large retrieves eight results
  • userip sets user’s IP as an abuse counter-mesure
  • callback runs JavaScript callback
  • context sets callback context
  • key sets API key

Examples:

To create RSS for US top stories:
http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&output=rss

To create RSS for Topic: Technology:
https://news.google.com/news/section?pz=1&cf=all&topic=tc
Or
https://news.google.com/news/section?pz=1&cf=all&ned=us&hl=en&topicsid=en_us:tc&ict=tnv3

To create RSS for keyword search (google) in Topic: Technology:
https://news.google.com/news/section?pz=1&cf=all&ned=us&hl=en&q=Google&topicsid=en_us:tc&ict=tnv3

To create RSS for keyword search (AT&T) in Topic: Technology:
https://news.google.com/news/section?pz=1&cf=all&ned=us&hl=en&q=AT%26T&topicsid=en_us:tc&ict=tnv5

To create RSS for keyword (google) and sort output by newest:
http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&scoring=n&q=google&output=rss