Skip to content

Instantly share code, notes, and snippets.

Raja rajakannan

Block or report user

Report or block rajakannan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rajakannan / WordPress-Utility.php
Created Jul 12, 2019
Most used wordpress custom codes
View WordPress-Utility.php
// Custom Post Type //
* Creating a function to create our CPT tours

Advanced JavaScript Learning Resources

This is a list of advanced JavaScript learning resources from people who responded to this [Tweet][13] and this [Tweet][20].

  • [You Don't Know JS][3]

  • [Frontend Masters courses by Kyle Simpson][12]

  • [@mpjme][6]'s [YouTube videos][5]

rajakannan / react-note.txt
Created Apr 29, 2019
React / React Native Notes
View react-note.txt
# Clear bundle cache before release build
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/ --assets-dest android/app/src/main/res/
# Get a release build
cd android && ./gradlew assembleRelease && ../
# Get a debug build
cd android && ./gradlew assembleDebug && ../
View nexmo_call_test.json
"action": "talk",
"voiceName": "Russell",
"text": "Hi Darling.Learn javascript as soon as possible.Love you. Bye"
rajakannan /
Created Oct 31, 2016
Linux apache file and directory permission
sudo groupadd www
sudo usermod -a -G www ec2-user
sudo usermod -a -G www apache
sudo chown -R root:www castle_invoice/
find ./castle_invoice -type d -exec sudo chmod 2775 {} \;
find ./castle_invoice -type f -exec sudo chmod 0664 {} \;
sudo service httpd restart
rajakannan / ubuntu-php-version-switch.txt
Last active Jul 21, 2018
How can I downgrade from PHP 7 to PHP 5.6 on Ubuntu 16.04?
View ubuntu-php-version-switch.txt
Switch PHP version:
From php5.6 to php7.0 :
sudo a2dismod php5.6 ; sudo a2enmod php7.0 ; sudo service apache2 restart
sudo ln -sfn /usr/bin/php7.0 /etc/alternatives/php
rajakannan / woocommerce-failed-order-email-notification.php
Created Mar 14, 2016
WooCommerce failed order email notification
View woocommerce-failed-order-email-notification.php
* Add a failed order email notification
function sp_failed_order_email_notification( $order_id ) {
$order = wc_get_order( $order_id );
$to = get_option( 'admin_email' );
$subject = 'A order failed, action required';
rajakannan / gv-copy-.js
Created Jan 7, 2016
Gravity Form copy form fields (Eg: same as billing address check box for shipping address )
View gv-copy-.js
function bindGformHandlers() {
//bind the click function
$(document).on('click', '.fill-check input', function() {
if($(this).is(':checked')) {
//put in the selectors we fill from
var fill_from = $('.fill-from, .fill-from .name_last, .fill-from .name_first');
fill_from.each(function() {
//get the label
rajakannan / gformscopyaddress.js
Created Jan 7, 2016 — forked from tnorthcutt/gformscopyaddress.js
Autofill a set of fields (in a gravity form, in this case) based on a checkbox being checked.
View gformscopyaddress.js
jQuery(document).ready(function($) {
$('input#choice_13_1').click(function() {
if($(this).is(':checked')) {
rajakannan / wc-product-meta-display.php
Created Mar 1, 2015
Here is a quick snippet to display WooCommerce product custom meta fields values (place it in functions.php):
View wc-product-meta-display.php
* WooCommerce Extra Feature
* --------------------------
* Display product meta field in a shortcode
* ex: [woo_custom_field id="my-custom-field"]
function woo_custom_field_shortcode( $atts, $content = null ) {
You can’t perform that action at this time.