Skip to content

Instantly share code, notes, and snippets.

View himanshu8dev's full-sized avatar
🎯
Focusing

Himanshu himanshu8dev

🎯
Focusing
View GitHub Profile
@himanshu8dev
himanshu8dev / Awesome PHP.md
Created June 2, 2022 05:02 — forked from pvanfas/Awesome PHP.md
A curated list of amazingly awesome PHP libraries, resources and shiny things.

Developers and Open Source authors now have a massive amount of services offering free tiers, but it can be hard to find them all to make informed decisions.

This is a list of software (SaaS, PaaS, IaaS, etc.) and other offerings that have free tiers for developers.

The scope of this particular list is limited to things that infrastructure developers (System Administrator, DevOps Practitioners, etc.) are likely to find useful. We love all the free services out there, but it would be good to keep it on topic. It's a bit of a grey line at times so this is a bit opinionated; do not be offended if I do not accept your contribution.

This list is the result of Pull Requests, reviews, ideas and work done by 1100+ people. You too can help by sending Pull Requests to add more services or by remove ones whose offerings have changed or been retired.

function unfollowProcess() {
init = function(){
var requestButton = this.getMainButton()
setTimeout(function() {
requestButton.onclick = this.unfollow();
// console.log(requestButton);
requestButton.click();
}, 5000);
},
@himanshu8dev
himanshu8dev / UpgradeProcess.md
Last active April 5, 2019 07:45
Explanation of Magento 2 Setup upgrade

How Upgrade Process Work

On Initial level, first of all when setup:upgrade command executed then it will check your module's module.xml version if your xml version and setup_module table's version are diffrent then it will call upgradeSchema.php respectively upgradeData.php. and then it will check the condition on version changes.

Example

@himanshu8dev
himanshu8dev / checkout.xml
Created March 8, 2019 09:35
Magento 2 Static Text Element Block for layout xml
<container name="subscribenow.item.summary" htmlTag="div" htmlClass="subscribenow-item-summary">
<block class="Magento\Framework\View\Element\Text" name="subscription.summary.title">
<arguments>
<argument translate="true" name="text" xsi:type="string">
<![CDATA[<strong class="title">Subscription Summary</strong>]]>
</argument>
</arguments>
</block>
</container>
@himanshu8dev
himanshu8dev / m2
Created February 7, 2019 05:16
Run M2 Command in short form
#!/usr/bin/env bash
cmdname=${1?Error: please run command}
cmdopt1=${2}
cmdopt2=${3}
cmdopt3=${4}
cmdopt4=${5}
cmdopt5=${6}
cmdopt6=${7}
@himanshu8dev
himanshu8dev / vhost.conf
Created February 4, 2019 13:02
Dynamic Apache Virtual Host
# Local Development
<VirtualHost *:8080>
ServerName dev.local
ServerAlias *.dev.local
DocumentRoot "/var/html/www/dev/"
ServerAdmin webmaster@dev.local
ErrorLog "logs/dev-local-error.log"
CustomLog "logs/dev-local-access.log" common
@himanshu8dev
himanshu8dev / m2_cron.md
Last active February 1, 2019 10:04
Setup & Run Cron in magento 2

I hope you have set your php as global & you are running below command in magento directory.

php bin/magento cron:install -f

IGNORE

@himanshu8dev
himanshu8dev / canvas_image.js
Created February 1, 2019 05:02
Conver Image to data image
function convertImgToDataURLviaCanvas(url, callback, outputFormat) {
var img = new Image();
img.crossOrigin = 'Anonymous';
img.onload = function() {
var canvas = document.createElement('CANVAS');
var ctx = canvas.getContext('2d');
var dataURL;
canvas.height = this.height;
canvas.width = this.width;
ctx.drawImage(this, 0, 0);