Skip to content

Instantly share code, notes, and snippets.

View yrcjaya's full-sized avatar

Jayaseelan Yezhuaralai yrcjaya

View GitHub Profile
@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)
@yrcjaya
yrcjaya / .gitignore
Created April 1, 2015 07:11
Git add empty directory
# Ignore everything in this directory
*
# Except this file
!.gitignore
@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 / 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 / .gitconfig
Last active November 21, 2015 09:56
My Git Config
[include]
path = .gitconfig.local
[core]
editor = /usr/bin/vim
autocrlf = input
packedGitLimit = 64m
packedGitWindowSize = 64m
[color]
diff = auto
status = auto
@yrcjaya
yrcjaya / .profile
Created November 19, 2015 03:51
My .profile
# Sublime text editor
alias subl="/opt/Sublime\ Text\ 3/sublime_text -n"
## Sublime text editor that doesn't fork
alias sublw="/opt/Sublime\ Text\ 3/sublime_text -n -w"
# Display extending
## Only laptop screen
alias display-laptop="xrandr --output VGA-1 --off"
## Extend to left monitor
alias display-extend-left="xrandr --output VGA-1 --mode 1920x1080 --left-of eDP-1"
@yrcjaya
yrcjaya / Makefile
Last active February 15, 2016 15:39
Make CSR
DOMAIN=example.com
.PHONY: help csr
$(DOMAIN).key:
openssl genrsa -out $(DOMAIN).key 2048
@echo "Generated SSL key, keep this safe for future use"
$(DOMAIN).csr: $(DOMAIN).key
openssl req -new -key $(DOMAIN).key -out $(DOMAIN).csr

Keybase proof

I hereby claim:

  • I am yrcjaya on github.
  • I am yrcjaya (https://keybase.io/yrcjaya) on keybase.
  • I have a public key whose fingerprint is E6B6 54C5 62E6 708E 94D7 0D2D E481 B550 7C16 6AB4

To claim this, I am signing this object:

@yrcjaya
yrcjaya / utils.py
Created February 12, 2018 15:37
Sanitizing project name base on path
"""
Sanitizing filename
from: https://github.com/pypa/pipenv/blob/master/pipenv/project.py
"""
def virtualenv_name(self):
# Replace dangerous characters into '_'. The length of the sanitized
# project name is limited as 42 because of the limit of linux kernel
#
# 42 = 127 - len('/home//.local/share/virtualenvs//bin/python2') - 32 - len('-HASHHASH')
@yrcjaya
yrcjaya / ascii-art.txt
Created June 26, 2018 07:34
SR-ASCII-ART
`.:/+o/
`:+syyyo+//-h/
.+yys+::------.-m.
:hho/:---------...+h
:hh+::--....----.`--.d/
`sdo::--://///:-..`.--`oh
.dh/:::++ydmmdhyo/:`.--`/m`
.mh/:-/+omNNNmmdddy+/.--`/N`
.dh::-:+/dNNNmmdddhhs+--.`om
`dd/:--:+:mNNNmmmddhhs+:-..do