Skip to content

Instantly share code, notes, and snippets.

View rahulsprajapati's full-sized avatar
🎧
Music + Coffee + Code

Rahul Prajapati rahulsprajapati

🎧
Music + Coffee + Code
View GitHub Profile
@rahulsprajapati
rahulsprajapati / androidPurchaseReceipt.json
Created February 16, 2016 16:09 — forked from pauly4it/androidPurchaseReceipt.json
All code for Validating Android In-App Purchases With Laravel blog post: http://blog.goforyt.com/validating-android-app-purchases-laravel/
{
"receipt": {
"type": "android-playstore",
"id": "12345678901234567890.1234567890123456",
"purchaseToken": "purchase token goes here",
"receipt": "{"orderId":"12345678901234567890.1234567890123456","packageName":"com.example.app","productId":"com.example.app.product","purchaseTime":1417113074914,"purchaseState":0,"purchaseToken":"purchase token goes here"}",
"signature": "signature data goes here"
}
}
@rahulsprajapati
rahulsprajapati / pre-commit
Created June 17, 2016 20:40 — forked from Ritesh-patel/pre-commit
WordPress Plugin pre-commit
#!/bin/bash
# WordPress Plugin pre-commit hook
set -e
message="Checking staged changes..."
git_status_egrep='^[MARC].+'
for i; do
case "$i"
'use strict';
module.exports = function(grunt) {
// load all grunt tasks matching the `grunt-*` pattern
// Ref. https://npmjs.org/package/load-grunt-tasks
require('load-grunt-tasks')(grunt);
grunt.initConfig({
// Fontello Icons
// Note: This is one time running task, so run grunt after update assets/fontello/config.json file
// Ref. https://npmjs.org/package/grunt-fontello
fontello: {
<?php
/**
* Created by PhpStorm.
* User: rahul
* Date: 5/8/16
* Time: 3:16 PM
*
* @ref https://gist.github.com/kucrut/3804376
*/
@rahulsprajapati
rahulsprajapati / ubuntu-gnome-setup.sh
Created September 22, 2016 05:37
Install all necessary packages on fresh ubuntu machine.
#!/bin/bash
# Error handling
function error()
{
echo -e "[ `date` ] $(tput setaf 1)$@$(tput sgr0)"
exit $2
}
@rahulsprajapati
rahulsprajapati / admin.php
Created March 2, 2017 18:07
Tinymce Editor for Shortcode UI plugin.
if ( ! function_exists( 'shortcode_enqueue_editor_scripts' ) ) {
/**
* Enqueue our editor area scripts and styles.
*/
function shortcode_enqueue_editor_scripts() {
wp_register_script( 'shortcode_editor_script', get_template_directory_uri() . '/js/admin/editor-script.js', array( 'shortcode-ui' ), false, true );
wp_enqueue_script( 'shortcode_editor_script' );
}
/**
* Enqueue shortcode ui editor script after shortcode UI assets have been enqueued.

Keybase proof

I hereby claim:

  • I am rahulsprajapati on github.
  • I am rahulsprajapati (https://keybase.io/rahulsprajapati) on keybase.
  • I have a public key whose fingerprint is 8D77 C942 62B5 6A77 FF2E 3020 FA83 2C34 7A42 5F12

To claim this, I am signing this object:

I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):

Detailed Instructions

For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.

Install Jenkins Plugins

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@rahulsprajapati
rahulsprajapati / accordion-shortcode.php
Last active April 30, 2021 21:32
Custom Shortcode UI Functionality: TinyMce And Repeater
<?php
/**
* Accordion ShortCode.
*
* @param array $accordion_attrs Accordion ShortCode attribute.
*
* @return string
*/
function accordion_register_shortcode( $accordion_attrs ) {