Skip to content

Instantly share code, notes, and snippets.

View dwaghmare's full-sized avatar

Dinesh waghmare dwaghmare

View GitHub Profile

Keybase proof

I hereby claim:

  • I am dwaghmare on github.
  • I am dwaghmare (https://keybase.io/dwaghmare) on keybase.
  • I have a public key ASAd3ubWVqXnkdLMsKCjYsG-yByDYVhnH66bRyf0SRLMngo

To claim this, I am signing this object:

@dwaghmare
dwaghmare / sap
Created January 22, 2016 15:00 — forked from tomflanagan/sap
Example of extending wsclient.
<?php
function sap_soap_menu() {
$items['sap/getusers'] = array(
'page callback' => 'sap_soap_users',
'access arguments' => array('access content'),
'type' => MENU_NORMAL_ITEM,
);
return $items;
}
@dwaghmare
dwaghmare / drupal-entity-code.php
Created December 9, 2015 14:06 — forked from underhilllabs/drupal-entity-code.php
Code example for custom Entity
<?php
/**
* Implements hook_entity_info().
*/
function dance_code_entity_info() {
$ents['proficiency'] = array(
'label' => t('Proficiency Status'),
'plural label' => t('Proficiency Statuses'),
'fieldable' => TRUE,
<?php
/*
* https://gist.github.com/marktheunissen/2596787
*/
function oi_migrate_migrate_api() {
$api = array(
'api' => 2,
'groups' => array(
@dwaghmare
dwaghmare / htmlfiles_migration.inc.php
Created November 6, 2015 13:59 — forked from marktheunissen/htmlfiles_migration.inc.php
HTML Files Migration into Drupal using Migrate
<?php
class MyMigration extends Migration {
public $base_dir;
/**
* Constructor.
*/
public function __construct() {
parent::__construct();
@dwaghmare
dwaghmare / README
Created November 6, 2015 12:24 — forked from holtzermann17/README
Drupal Migration
These files import ONE database table (users) into Drupal.
Some key issues to note for the record:
* getting the name of the hook right in planetmath.module
(it should be MODULENAME_migrate_api).
* make sure to clear the cache after the module is
imported (drush cc all). This should help identify any
coding errors!
@dwaghmare
dwaghmare / 1.json
Created November 6, 2015 12:22 — forked from SeanJA/1.json
a simple json file migration for the drupal 7 (maybe 6?) migrate module
{
"title": "this is a title",
"content": "this is a body",
"date": "2009-01-01",
"url":"http://oldsite.com/123/test",
"image": "test.jpg",
"id": 1
}
//echo env path in better format
echo "${PATH//:/$'\n'}"
//install drush
//https://www.lullabot.com/articles/switching-drush-versions
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
#!/bin/bash
# Take a MySQL DB dump excluding some tables.
#
# Usage:
# ./drupal-quick-dump user host database
USER="$1"
HOST="$2"
DB="$3"
DATE=`date +%Y%m%d`