Skip to content

Instantly share code, notes, and snippets.

View elamurugan's full-sized avatar

Ela elamurugan

  • One Team US
  • Troy, Michigan
View GitHub Profile
@MagePsycho
MagePsycho / mage2-codebase-database-backup.sh
Last active May 29, 2018 03:58
Shell Script: Magento2 Database + Codebase Backup. More - http://www.blog.magepsycho.com/
#!/bin/bash
#
# Script to backup Magento2 Codebase + Database
#
# @author Raj KB <magepsycho@gmail.com>
# @website http://www.magepsycho.com
# @version 0.1.0
# UnComment it if bash is lower than 4.x version
@broofa
broofa / Chrome_Go_To_Line.js
Created September 12, 2017 16:11
Bookmarklet for Go To Line in Chrome "view-source" pages
// Instructions
// 1. Go to Chrome -> Bookmarks -> Bookmarks Manager
// 2. Right-click Bookmarks Bar -> "Add Page ..."
// 3. Enter "Go To Line" for Name
// 4. Copy/paste the code below into URL (From-and-including "javascript:" to "void 0;"
//
// Now on any "view-source:..." page in Chrome, click the Bookmarks -> Go To Line menu
// item to scroll to and highlight the line of your choice
// -----
@dannygsmith
dannygsmith / valet-plus-destroy
Last active July 18, 2023 09:07
Remove valet-plus - reboot required
#!/usr/bin/env bash
#styles
VP_NONE='\033[00m'
VP_RED='\033[01;31m'
VP_GREEN='\033[01;32m'
VP_YELLOW='\033[01;33m'
VP_PURPLE='\033[01;35m'
VP_CYAN='\033[01;36m'
VP_WHITE='\033[01;37m'
@yireo
yireo / .gitignore
Created July 16, 2017 11:11
Magento 2 gitignore file
# Metadata
/.buildpath
/.cache
/.metadata
/.project
/.settings
atlassian*
/nbproject
/sitemap
/.idea
<?php
/**
*
* @author Raj KB<magepsycho@gmail.com>
* @website http://www.magepsycho.com
* @extension MassImporterPro: Pricing - http://www.magepsycho.com/mass-importer-pro-price-importer-regular-special-tier-group.html
*/
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
@aleron75
aleron75 / getip.sh
Created September 17, 2016 09:17
Get IP address on local network interface
#!/bin/bash
ip addr show eno1 | grep -oPi 'inet \K[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
@TheFrankman
TheFrankman / Release.php
Last active August 16, 2017 17:22
Programatically Create Order
<?php
/**
* @author Frank Clark
*/
namespace Vendor\Namspace\Model\Subscription\Order;
use Vendor\Namspace\Model\ResourceModel\Subscriptions\CollectionFactory;
use Vendor\Namspace\Api\SubscriptionsOrdersRepositoryInterface;
use Vendor\Namspace\Model\SubscriptionsOrdersFactory;
use Vendor\Namspace\Model\Subscriptions;
@abr4xas
abr4xas / summernote-upload.js
Last active August 6, 2019 14:57
Summernote image upload
$('.summer').summernote({
height: "200px",
callbacks: {
onImageUpload: function(files) {
url = $(this).data('upload'); //path is defined as data attribute for textarea
sendFile(files[0], url, $(this));
}
}
});
@vmasciotta
vmasciotta / sandbox.php
Created April 5, 2016 00:27
Magento2 Sandbox
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
//echo "hello world";
try {
require __DIR__ . '/app/bootstrap.php';