Skip to content

Instantly share code, notes, and snippets.

View hazdik's full-sized avatar
👑
Not Crewed, Just Crowned !!!

Dinakaran Arumairaj hazdik

👑
Not Crewed, Just Crowned !!!
View GitHub Profile
@hazdik
hazdik / PushNotifications.php
Created December 30, 2019 11:04 — forked from joashp/PushNotifications.php
Simple PHP script to send Android Push Notification, iOS Push Notification and Windows Phone 8 Push Notification
<?php
// Server file
class PushNotifications {
// (Android)API access key from Google API's Console.
private static $API_ACCESS_KEY = 'AIzaSyDG3fYAj1uW7VB-wejaMJyJXiO5JagAsYI';
// (iOS) Private key's passphrase.
private static $passphrase = 'joashp';
// (Windows Phone 8) The name of our push channel.
private static $channelName = "joashp";
@hazdik
hazdik / couchdb-undelete.rb
Created December 24, 2019 07:04 — forked from vjt/couchdb-undelete.rb
Undeletes a document from a CouchDB database.
#!/usr/bin/env ruby
#
# Undelete a document from a CouchDB database.
#
# Recovers a previously deleted document by looking at the _changes
# feed, putting a new empty document preserving the revisions chain,
# retrieves the revs_info for the document, asks the user which one
# to recover, and puts back the old revision into place.
#
# For this to work, GETting the document must return error: "not_found",
@hazdik
hazdik / gauge.js
Created August 21, 2019 07:30 — forked from paulinm/gauge.js
A Google-style Gauge Implemented using D3 with Optional Min, Max, and Running Average Tracking
function Gauge(placeholderName, configuration)
{
this.placeholderName = placeholderName;
var minValue = null;
var maxValue = null;
var avgValue = null;
var avgCounter = 0;
var self = this; // for internal d3 functions
.clear {
clear: both;
}
.card {
margin: auto;
padding-top: 2em;
padding-bottom: 1em;
padding-left: 1em;
padding-right:1em;
@hazdik
hazdik / one-file-component-native-encapsulation.ts
Created February 26, 2019 08:09 — forked from sulco/one-file-component-native-encapsulation.ts
Simple one-file Angular component with `ViewEncapsulation.Native`
import { Input, Component, ViewEncapsulation, EventEmitter, Output } from '@angular/core';
@Component({
selector: 'custom-button',
template: `<button (click)="handleClick()">{{label}}</button>`,
styles: [`
button {
border: solid 3px;
padding: 8px 10px;
background: #bada55;
@hazdik
hazdik / arrow-buttons-for-responsive-horizontal-scroll-menu.markdown
Created October 3, 2018 08:22
Arrow buttons for responsive horizontal scroll menu
@hazdik
hazdik / google-analytics-event-tracking.js
Created August 29, 2017 07:32
Google Analytics Event Tracking Javascript
/**!
* Google Analytics Event Tracking
* Note: Assuming that tracking code already exists on the page
* Require jQuery 1.x or 2.x
* Supports: Classic and Universal Google Analytics
* @version 2.1.0
* @license MIT
* @author ankur
*/
@hazdik
hazdik / event.tracking.js
Created August 29, 2017 07:32 — forked from wilr/event.tracking.js
Simple jQuery Helper for wrapping GA event tracking
(function($) {
/*
A simple helper plugin for wrapping Google Analytic event tracking
into sites through jQuery and HTML5 data attributes.
This assumes that you have used the standard configuration provided
by google for setting up Google Analytics and used the _gaq var for
storing the tracker.
Can track focus, activate, hover and click input methods but not key
@hazdik
hazdik / ga-event-tracker.js
Created August 29, 2017 07:31 — forked from cheynewallace/ga-event-tracker.js
jQuery Google Analytics Event Tracking Using HTML Attributes
/*JSHint Options*/
/*global _gaq */
/*
Google Analytics Event Tracking - JSHint Checked
Written By Cheyne Wallace - 19th Nov 2012
Click Usage: <a href="http://somewhere"
class="ga-track"
event_category="Event Category"
event_action="Specific Action"
event_label="Optional Message"
@hazdik
hazdik / proxy.php
Created July 6, 2017 10:25 — forked from iovar/proxy.php
Simple PHP Proxy Script
<?php
/*
* Warning! Read and use at your own risk!
*
* This tiny proxy script is completely transparent and it passes
* all requests and headers without any checking of any kind.
* The same happens with JSON data. They are simply forwarded.
*
* This is just an easy and convenient solution for the AJAX