Skip to content

Instantly share code, notes, and snippets.

View nkgokul's full-sized avatar

Gokul N K nkgokul

View GitHub Profile
@nkgokul
nkgokul / github_webhook.php
Last active August 29, 2015 14:13
Sanity check for Github Webhook
<?php
//Github sanity check
$secret = 'my_secret_entered_on_webhook_settings_page';
$headers = getallheaders();
$hubSignature = $headers['X-Hub-Signature'];
list($algo, $hash) = explode('=', $hubSignature, 2);
$payload = file_get_contents('php://input');
$data = json_decode($payload);
$payloadHash = hash_hmac($algo, $payload, $secret);
drush en --y admin_menu admin_views ckeditor context entityreference features module_filter reldate strongarm pathauto globalredirect chosen devel eazylaunch date admin_menu_toolbar
drush ckeditor-download
drush chosenplugin
drush dis toolbar
drush cc all
@nkgokul
nkgokul / virtualhosts
Created February 19, 2015 06:19
List all Virtual Hosts for Apache2 on Ubuntu
apache2ctl -S
@nkgokul
nkgokul / linux_list_all_folders_within_current_foler
Created February 19, 2015 06:53
List of all modules folders within the current folder
find . -name "*.info" -exec basename \{} .info \; | paste -s -d,
@nkgokul
nkgokul / gist:c38731caa5bc17ecc779
Created February 19, 2015 06:58
Drush List all enabled non core module in comma separated format.
drush pml --type=Module --status=Enabled --no-core --pipe | paste -s -d,
@nkgokul
nkgokul / git_commit_only_modified files
Created February 19, 2015 09:50
Git commit only modified files
git ls-files --modified
!! | git add
@nkgokul
nkgokul / drush_diesable_non_core_modules
Created February 19, 2015 15:28
Drush disable non core module - Useful for debugging
drush pml --no-core --type=module --status=enabled --pipe | xargs drush -y dis
@nkgokul
nkgokul / drupalxraytosimplytestme
Created February 23, 2015 08:45
Generate a link to SimplyTest.me from DrupalXray.com
var generateString = "http://simplytest.me/project/drupal/";
var drupalVersionString = jQuery(".xray-site div.xray-site-info:nth-child(3)").text();
var drupalVersion = drupalVersionString.split(": ").pop();
generateString += drupalVersion + "?";
jQuery(".xray-site-modules ul li a").each(
function(){
var url = jQuery(this).attr("href");
var lastPart = url.split("/").pop();
generateString += "add[]=" + lastPart + "&";
}
@nkgokul
nkgokul / drushqueryfromdrupalxray
Created February 23, 2015 08:53
Drush query from drupalxray
var drushString = "drush en --y ";
jQuery(".xray-site-modules ul li a").each(
function(){
var url = jQuery(this).attr("href");
var lastPart = url.split("/").pop();
drushString += lastPart + " ";
}
);
console.log(drushString);
@nkgokul
nkgokul / drupal_quick_siteinstall
Created February 23, 2015 10:52
Drupal Quick site install
drush dl drupal-6 --drupal-project-rename=drupal6
cd drupal6
drush si --db-url=mysql://root:@localhost/drupal6