How to Blacklist in CM12

One of the useful feature in CyanogenMod 12 is the ability to blacklist and stop unwanted calls. You can block the phone numbers from calling or sending you texts by adding those numbers to the Blacklist.

Here is how to set up a Blacklist:

  1. Go to > Settings > Privacy > Blacklist

    Settings_Privacy

    Privacy_Blacklist

  2. In the Blacklist, touch the Add (+) button to add an entry and touch OK.

    Blacklist_touch_Plus

    Enter_Number_OK

That’s it!

Making a bootable USB key from an .iso image on OS X

To create a bootable USB key from an .iso image on OS X so that a machine with the ability to boot from USB keys can boot it, you need to first create an .img file from the .iso file you downloaded.

Tip: Drag and drop a file from Finder to Terminal to ‘paste’ the full path without risking typing errors.

Open the Terminal and type the following command to convert the .iso file to .img using the convert option of hdiutil e.g.,

hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/downloaded.iso

Note: OS X tends to put the .dmg ending on the output file automatically.

Run

diskutil list

to get the current list of devices.

Insert your flash media.

Run

diskutil list

again and determine the device node assigned to your flash media (e.g. /dev/disk2).

Run

diskutil unmountDisk /dev/diskN

(replace N with the disk number from the last command; in the previous example, N would be 2).

Execute

sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m
  • Using /dev/rdisk instead of /dev/disk may be faster
  • If you see the error dd: Invalid number ‘1m’, you are using GNU dd. Use the same command but replace bs=1m with bs=1M
  • If you see the error dd: /dev/diskN: Resource busy, make sure the disk is not in use. Start the ‘Disk Utility.app’ and unmount (don’t eject) the drive
  • To see progress you can type ctrl-t

Run

diskutil eject /dev/diskN

and remove your flash media when the command completes.

Take a screenshot in CM12 Lolipop

I just installed CM12 on my Galaxy S3, and was trying to figure out how to take a screenshot. There are two way you can take a screenshot in CM12. The first option is by holding the power and volume-down buttons at the same time. And the other option is by enable the ‘Screenshot‘ in ‘Power menu‘.

Step-by-step for option 2:

  1. Enter Settings and press Buttons under Device.
    Settings_Buttons
  2. Press Power menu under Power button.
    Buttons_PowerMenu
  3. In Power menu, click to check Screenshot.
    PowerMenu_Screenshot

That’s it.

Now when you press and hold the power button you will have the screenshot option in the menu like the image below.

PowerMenu_Screenshot_added

How to fix deprecated mysql_connect() warning

I recently moved one of my website to a new hosting, and got this warning:

mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead

Well, you can remove the warning by adding a ‘@’ before the ‘mysql_connect()’ function like so:

@mysql_connect($db_host, $db_user, $db_pass)

That’s it!

Disqus conflict with WordPress themes

This is a known issue, that Disqus embed currently loads wider than normal in both the Twenty Thirteen and Twenty Fourteen themes. To fix this issue, just follow the steps below:

  1. Enable “Output JavaScript in footer” in the Disqus plugin settings.

    Screen Shot 2014-12-08 at 12.34.00 PM

  2. Add the “entry-content” class to the “disqus_thread div” in the comments.php plugin file

    .Screen Shot 2014-12-08 at 12.25.37 PM

That’s it!