Skip to content

Instantly share code, notes, and snippets.

View hiddenpearls's full-sized avatar
🏁
About to reach my GOAL

Adnan hiddenpearls

🏁
About to reach my GOAL
View GitHub Profile
@hiddenpearls
hiddenpearls / select-countries-wp.php
Created December 23, 2015 13:29
Select Dropdown Countries Template for WordPress developers
/**
* Select Dropdown Countries Template for WordPress developers
* Author: Muhammad Adnan (http://adnan.pk/)
* Company: WPBrigade (http://wpbrigade.com/)
*/
<select name="country" id="country" class="form-control">
<option value="AF" <?php selected( $_POST['country'], 'AF' ); ?>>Afghanistan</option>
<option value="AX" <?php selected( $_POST['country'], 'AX' ); ?>>Åland Islands</option>
@hiddenpearls
hiddenpearls / listallfiles.php
Created September 6, 2015 18:21
Google Drive APIs with PHP - List all files and folders
function listAllFiles($driveService){
$parameters = array(
'maxResults' => '100'
);
$results = $driveService->files->listFiles($parameters);
echo '<table>';
@hiddenpearls
hiddenpearls / fetch-files-google-drive.php
Created September 2, 2015 04:28
Fetch latest files from Google Drive using PHP
<?php
// Display erros if any on the page.
error_reporting(E_ALL);
ini_set("display_errors", 1);
session_start();
if(isset($_GET['action']) and $_GET['action'] == 'logout'){
unset($_SESSION['accessToken']);
@hiddenpearls
hiddenpearls / gist:b4a18a39631a464877b4
Last active September 19, 2015 21:48
Adding a Checkbox in Hubspot forms in a hackable way
hbspt.forms.create({
portalId: '1234567',
formId: 'formid-here',
css: 'select{font-size:21px;line-height:36px;background: #0397d6;font-family:"ProximaNova-Regular";height: 36px;color: #fff;position: relative;box-shadow: 0 3px 5px rgba(0,0,0,.20);-moz-box-shadow: 0 3px 5px rgba(0,0,0,.20);-webkit-box-shadow: 0 3px 5px rgba(0,0,0,.20);border-radius: 5px;-moz-border-radius: 5px;-webkit-border-radius:5px;margin-bottom:11px;border:0;width: 100%;}select:focus{outline:none} label{display:none;}.fldSet4 input[type="text"], .fldSet4 input[type="email"]{font-size: 16px;} .input select{font-size: 16px;}',
onFormReady: function($form) {
$form.on('change', '#form_policy', function(){
if(jQuery(this).is(':checked')){