Skip to content

Instantly share code, notes, and snippets.

View neerav's full-sized avatar

Neerav D. neerav

View GitHub Profile
@neerav
neerav / WebinarJam.php
Last active February 2, 2018 18:57 — forked from coryjthompson/WebinarJam.php
WebinarJam API Class written in PHP
<?php
/**
* Class WebinarJam
* Implements the WebinarJam API as documented
* https://d3kcv4e58tsh6h.cloudfront.net/api/WebinarJamAPI.pdf
* Created Date : 03/02/2018
*/
class WebinarJam {
public static $API_URL = 'https://webinarjam.genndi.com/api/';
@neerav
neerav / common.js
Created September 10, 2012 18:26
JAVASCRIPT: Ajax response
/*function clientSideInclude(id, url) {
var req = false;
// For Safari, Firefox, and other non-MS browsers
if (window.XMLHttpRequest) {
try {
req = new XMLHttpRequest();
} catch (e) {
req = false;
}
} else if (window.ActiveXObject) {
@neerav
neerav / dropdownmenu.html
Created September 6, 2012 08:22
HTML: pure css dropdown menu n level
<style type="text/css">
/*------------------------------------*\
$HOUSEKEEPING
\*------------------------------------*/
*{ margin:0; padding:0; }
html{
padding:5%;
font:1em/1.5 Georgia, serif;
overflow-y:scroll;
}
@neerav
neerav / fb_event_invite.js
Created August 31, 2012 04:16
Javascript: Tick all checkbox Facebook Event invite
elms=document.getElementsByName("checkableitems[]");for (i=0;i<elms.length;i++){if (elms[i].type="checkbox" )elms[i].click()};
@neerav
neerav / gist:2874507
Created June 5, 2012 11:37
Measure execution time of code block
<!-- put this at the top of the page -->
<?php
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$starttime = $mtime;
?>
<!-- ******************************* -->
<!-- put other code and html in here -->
@neerav
neerav / gist:2874501
Created June 5, 2012 11:35
Stop WordPress plugin update check
<?php
add_filter( 'http_request_args', 'dm_prevent_update_check', 10, 2 );
function dm_prevent_update_check( $r, $url ) {
if ( 0 === strpos( $url, 'http://api.wordpress.org/plugins/update-check/' ) ) {
$my_plugin = plugin_basename( __FILE__ );
$plugins = unserialize( $r['body']['plugins'] );
unset( $plugins->plugins[$my_plugin] );
unset( $plugins->active[array_search( $my_plugin, $plugins->active )] );
$r['body']['plugins'] = serialize( $plugins );
}
@neerav
neerav / gist:2874454
Created June 5, 2012 11:22
Turn on PHP error reporting
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
?>
@neerav
neerav / gist:2642940
Created May 9, 2012 08:22
HTML Demo Content
<h1>CSS Basic Elements</h1>
<p>The purpose of this HTML is to help determine what default settings are with CSS and to make sure that all possible HTML Elements are included in this HTML so as to not miss any possible Elements when designing a site.</p>
<hr />
<h1 id="headings">Headings</h1>
<h1>Heading 1</h1>
<h2>Heading 2</h2>