Skip to content

Instantly share code, notes, and snippets.

{"sublimelinter_executable_map": {
"ruby": "/home/pratik/.rvm/rubies/ruby-2.0.0-p247/bin/ruby",
"php" : "/usr/bin/php",
"javascript":"/usr/local/bin/node",
"css":"/usr/local/bin/node"
}
}
@pratik60
pratik60 / drupal_service_sites
Created September 4, 2013 16:15
Drupal Service Sites
http://pingv.com/blog/an-introduction-drupal-7-restful-services - Creating own resource
https://drupal.org/node/783722 - Testing Resources
https://drupal.org/node/910598 - Making authenticated requests to REST Server
https://drupal.org/node/1514312 - create a new user using Services 3 And REST
insight-server.local/test/node?parameters[type]=article
@pratik60
pratik60 / import_dashboard_old.module
Created September 4, 2013 16:18
Import Dashboard with Session ID
<?php
function import_dashboard_menu() {
$items['admin/content/import_dashboard'] = array(
'title' => 'Import Dashboard',
'page callback' => 'drupal_get_form',
'page arguments' => array('import_dashboard_page'),
'access arguments' => array('access content'),
'type' => MENU_LOCAL_TASK
);
return $items;
@pratik60
pratik60 / Import Dashboard without session id
Created September 6, 2013 12:53
Import Dashboard without session id
<?php
function import_dashboard_menu() {
$items['admin/content/import_dashboard'] = array(
'title' => 'Import Dashboard',
'page callback' => 'drupal_get_form',
'page arguments' => array('import_dashboard_new_content'),
'access arguments' => array('access content'),
'type' => MENU_LOCAL_TASK | MENU_NORMAL_ITEM,
'expanded' => TRUE
);
@pratik60
pratik60 / Books - FFS
Created September 7, 2013 21:25
Books on FFS
http://www.fantasyfootballscout.co.uk/2013/09/07/the-big-numbers-gameweeks-1-3-defenders/?hc_page=6#hc_comment_5498684
is:unread in:inbox -category:{social promotions forums}
@pratik60
pratik60 / Preferences.sublime-settings
Created September 19, 2013 08:34
Sublime user settings for Drupal
{
"bold_folder_labels": true,
"caret_style": "wide",
"default_line_ending": "unix",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": false,
"fallback_encoding": "UTF-8",
"find_selected_text": true,
"font_options":
@pratik60
pratik60 / .vimrc
Created September 23, 2013 18:27
vimrc
set nocompatible
set backspace=indent,eol,start
syntax on 
set mouse=a
set showmatch
set autoindent
set foldmethod=manual
imap <silent> <Down> <C-o>gj
imap <silent> <Up> <C-o>gk
nmap <silent> <Down> gj
@pratik60
pratik60 / .bashrc_final
Created September 23, 2013 18:31
bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
@pratik60
pratik60 / ccavenue_with_rails
Created October 15, 2013 20:34
ccavenue rails
Integrating CCAvenue with Ruby on Rails site
Jul 30 · 2013
At www.dealbuddie.com, we recently had the need to integrate CCAvenue payment gateway to expand our delivery network across India. While CCAvenue provides sample files for php, jsp and C#, it had nothing to offer for rails. Since DealBuddie.com is developed using RoR, I had to build the required solution myself.
Following are quick steps for anybody who wants to do the same -
1) Create the functions required to create and verify your checksum, and add it to application_helper.rb
def verifyChecksum( merchantID, orderID, amount, authDesc, workingKey, checksum)