How to Pair Apple Wireless Keyboard with Windows 10

Hardware, How To, Mac OS, Software, Windows20 Comments

While I was fixing my Razer Blackwidow keyboard, I want to keep my PC operating, so I tried to connect the Apple Wireless Keyboard, the pairing process stopped because the Apple Wireless Keyboard can not detect the key entered.

I found a solution, here it is:

  • In Windows 10’s bluetooth settings (can be found in system tray), click on the icon and then click “Add Bluetooth Device”.
  • Then, on the Apple Wireless Keyboard, hold down Command + W, while Windows is searching for bluetooth devices.
  • Then (hopefully) after it finds your Keyboard, it will want to pair with it. Follow the on screen prompts and eventually you will have to type in a pairing code.
  • Type in this code and hit Return.
  • Your Keyboard should successfully pair with Windows 10 via Bluetooth

my_bluetooth_connection

source: https://discussions.apple.com/thread/7156437

Disassembly and Repair my Razer Deathadder and Blackwidow

Hardware, How To, , , , 2 Comments

It’s been almost 3 years of intensive usage, my Razer Deathadder mouse got a ‘double-click’ issue, when I expect a single click, it result double clicks and really annoying. At the same time, my Razer BlackWidow (which is mechanical) keys need few switch to be replaced, so I tried to fix them both.

Disassembly Gallery

Actually it’s quite fun to fix the pheripherals by self, the Deathadder now running smoothly, and so does my BlackWidow keyboard. Here’s some images taken during the process.

How to Integrate WordPress With Amazon S3

How To, Wordpress, , , Leave a comment

Amazon S3 is a scalable storage service from Amazon Web Service, I frequently use it for high traffic and heavy image / video sites, more than that, it also simplify the manage and backup process of your site because the “heavy” part of the web are hosted in different place from your server. Continue reading “How to Integrate WordPress With Amazon S3”

How to Remove Jetpack Sharing from Loop and Place it Somewhere Else

How To, PHP, WordpressLeave a comment

By default, jetpack sharing add hook to the bottom of your content. But in couple case you probably want it to display somewhere else, in Sidebar for instance. Okay, first we remove the it from the_content first.

[php]

function remove_jetpack_sharing() {

// Check if Jetpack sharing is installed
if( ! function_exists( ‘sharing_display’ ) )
return;

// Remove it from the_content
remove_filter( ‘the_content’, ‘sharing_display’, 19 );

}
add_action( ‘init’, ‘remove_jetpack_sharing’ );

[/php]

Then, you can use:

[php]

echo sharing_display();

[/php]

Somewhere in your part of template file. Cheers.

How to Remove / Dequeue / Deregister Script on WordPress

How To, Wordpress, Leave a comment

Using a complex premium theme with tons of features sometimes could be a potential issue of script conflicts. Oftenly, it loads scripts that we don’t even use, resulting in ridiculous load time and (like I said) increase the potential of conflicts with plugins.

My client requested a plugin that utilize isotope.js recently and I can’t get it working properly as is. So I started to trace the issue, and found out that isotope.js also loaded by the theme, also by it’s framework. So we have 3 isotope.js declared within a single page, what a waste!

Get to know the handle

Find out the handle that load the isotope, we can use global variable $wp_scripts to print it out.

[php]
global $wp_scripts;
var_dump($wp_scripts);
[/php]

It will printout the handle information

[html]

[“jquery-isotope”]=>
object(_WP_Dependency)#576 (6) {
[“handle”]=>
string(14) “jquery-isotope”
[“src”]=>
string(88) ”

[/html]

So you will know that the handle name is jquery-isotope

Dequeue and deregister it

We can use wp_dequeue_script to prevent the handle to be print by WordPress or use wp_deregister_script to unregister it from WordPress, means that we completely remove it from WordPress list.

[php]

function deregister_isotope() {
wp_dequeue_script( ‘jquery-isotope’ );
wp_deregister_script( ‘jquery-isotope’ );
}
add_action( ‘wp_print_scripts’, ‘deregister_isotope’ );

[/php]

That’s it, have a nice day!