Skip to content

Instantly share code, notes, and snippets.

View zulhfreelancer's full-sized avatar

Zulhilmi Zainudin zulhfreelancer

View GitHub Profile
@zulhfreelancer
zulhfreelancer / hellobar_wp_plugin.php
Last active August 29, 2015 14:05
Hide Hellobar Plugin On Specific WordPress Page
<?php
/*
This short code can help you to hide Hellobar plugin on specific WordPress page.
Just copy and paste this code into your 'hellobar_wp_plugin.php' file inside the 'hellobar_wp_plugin' folder.
Make sure the script URL is full and correct.
@zulhfreelancer
zulhfreelancer / hellobar_wp_plugin.php
Created September 1, 2014 14:49
Hide Hellobar Plugin On Multiple WordPress Page
<?php
/*
This short code can help you to hide Hellobar plugin on multiple WordPress page.
Just copy and paste this code into your 'hellobar_wp_plugin.php' file inside the 'hellobar_wp_plugin' folder.
Make sure the script URL is full and correct.
@zulhfreelancer
zulhfreelancer / jsonArray.html
Created September 6, 2014 09:26
Get Data From JSON Array Object
<script>
/*
This is the example of how to get data from JSON Array Object
If you want to get earliest data, you need to know the data length first. Then use 'jsonobject.data.length-1' to get it.
Uncomment my example to see how it's work
DEMO: http://jsfiddle.net/bpphzwgx/
@zulhfreelancer
zulhfreelancer / get-fb-page-access-token
Created September 8, 2014 15:02
Get Facebook Page Access Token
https://graph.facebook.com/oauth/access_token?grant_type=client_credentials&client_id=[APP_ID_HERE]&client_secret=[APP_SECRET_HERE]
<head>
<script>
function getData() {
var json = {
"entry": [{
"id": "11014108",
"hash": "9db0054df76cc4b80888ff713527a652",
"requestHash": "zulhfreelancer",
"profileUrl": "http:\/\/gravatar.com\/zulhfreelancer",
"preferredUsername": "zulhfreelancer",
@zulhfreelancer
zulhfreelancer / 24-hour-to-12-hour.html
Created October 7, 2014 00:58
Convert 24 hour time to 12 hour format // Demo: http://jsfiddle.net/tvpt4zgp/
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>24 hour format to 12 hour format</title>
</head>
<body>
<p id="am"></p>
<p id="pm"></p>
<script type="text/javascript">
@zulhfreelancer
zulhfreelancer / dynamic-dropdown.html
Created December 19, 2014 17:50
Simple Dynamic Dropdown (Malaysia States) Using jQuery // Demo: http://jsfiddle.net/qwv7vLvy/
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Dynamic Dropdown</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
</head>
<body>
@zulhfreelancer
zulhfreelancer / update_npm_cordova_phonegap
Last active August 29, 2015 14:12
Update NPM, Cordova & Phonegap On Mac Using Terminal
===
Phonegap
===
To check current (installed) version:
phonegap -v
To check latest version in npm (not installed yet):
npm info phonegap version
@zulhfreelancer
zulhfreelancer / index.html
Created January 8, 2015 15:02
Bytes to Terabyte (TB), Gigabyte (GB), Megabyte (MB) & Kilobyte (KB) Javascript // Demo: http://jsfiddle.net/5xzLw9dt/
<span id="bytes"></span> = <span id="converted"></span>
@zulhfreelancer
zulhfreelancer / index.html
Last active August 29, 2015 14:13
Web Hosting Bandwidth Calculator (jQuery) // Demo: http://jsfiddle.net/cydL0hby/4/
<h4>Web Hosting Bandwidth Calculator</h4>
<form>
<input id="avg_page_size" placeholder="Avg page size (MB)" type="text" />
<br/>
<br/>
<input id="avg_daily_visitor" placeholder="Avg daily visitor" type="text" />
<br/>
<br/>
<input id="avg_pages_per_visit" placeholder="Avg pages per visit" type="text" />