Skip to content

Instantly share code, notes, and snippets.

View yrcjaya's full-sized avatar

Jayaseelan Yezhuaralai yrcjaya

View GitHub Profile
@yrcjaya
yrcjaya / ga_event_track.js
Last active April 6, 2020 16:10
Google Analytics click event tracker as data attribute. Uses jQuery for event handling
/**
* Google analytics tracking
* add attribute data-ga-event with json encoded dictionary
* with keys eventLabel, eventAction, eventCategory
* eg:
* # Sample JSON structure
* {
* "eventLabel":" Send Event",
* "eventAction": "click",
* "eventCategory": "CTA"
@yrcjaya
yrcjaya / split_ttc_font_to_ttf.py
Created October 29, 2015 09:32
Convert font TTC to TTF
"""Convert TTC font to TTF using fontforge with python extension.
**Warning** The scripts saves splitted fonts in the current working directory.
Usage:
split_ttc_font_to_ttf.py Droid.ttc
"""
import sys
import fontforge
@yrcjaya
yrcjaya / .gitignore
Created April 1, 2015 07:11
Git add empty directory
# Ignore everything in this directory
*
# Except this file
!.gitignore
@yrcjaya
yrcjaya / Makefile
Last active December 27, 2015 18:09
Makefile for Joomla component packaging
COM_NAME = com_helloworld
ARCHIVE_FNAME = archive/$(COM_NAME)_$(shell date +%Y%m%d_%H%M).tar.bz2
.PHONY: package
package: clean
mkdir build
cp -a $(COM_NAME) build/$(COM_NAME)
find build/$(COM_NAME) -type d -not -path build/$(COM_NAME) -exec cp build/$(COM_NAME)/index.html {} \;
cd build/$(COM_NAME);zip -r ../$(COM_NAME).zip . -x \*.swp
rm -rf build/$(COM_NAME)