Skip to content

Instantly share code, notes, and snippets.

View git-bhanu's full-sized avatar
🐘
Always developing

Bhanu git-bhanu

🐘
Always developing
View GitHub Profile
@git-bhanu
git-bhanu / docker.bash
Created April 30, 2024 16:11
Docker important commands
# restart only those docker container which are exited
docker restart $(docker container ls -f status=exited -a -q)
@git-bhanu
git-bhanu / fix_ppk_are_too_open_openlitespeed.md
Created November 30, 2021 09:28
When setting up openlitespeed on AWS and trying to scp you can get `.ppk are too open` issue. This gist is a document which would help you fix that.

Fix .ppk are too open when running the command from your windows WSL

(This may work on windows CMD terminal as well.)

Quick fix command that needs to be used.

sudo scp -i /mnt/d/PuttyKey/live_open_ssh -r /mnt/d/ixi\ backup/November_29_acf8a2576fd1cce99287_20211129171850_archive.zip [email protected]:/var/www/html

When you will run this you may get

@git-bhanu
git-bhanu / useful_packages.md
Last active July 7, 2021 20:14
A list of useful packages that can be used in projects.

JavaScript

  1. Tippy JS : Tippy.js is the complete tooltip, popover, dropdown, and menu solution for the web
  2. Parsley JS : JavaScript form validation library
  3. Atlaskit : Design Kit by Atlassian : Atlassian's official UI library, built according to the Atlassian Design System.
  4. Ant Design : A design system for enterprise-level products. Create an efficient and enjoyable work experience.
  5. VueUse
@git-bhanu
git-bhanu / scrape.py
Created June 4, 2021 09:31
python script to scrape data
import pandas as pd
from tqdm import tqdm
from selenium.webdriver import Chrome
from selenium.webdriver.support.ui import WebDriverWait
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import TimeoutException
from time import sleep
data = pd.read_csv("D:\Scrape\WooCommerce Plugin\woocommerce_resultData.csv")
@git-bhanu
git-bhanu / ols_conf.md
Last active December 9, 2021 15:22
OLS droplet configuration settings.

PHP INI changes:

upload_max_filesize = 64M
max_file_uploads = 200
post_max_size = 64M
memory_limit = 2000M
max_execution_time = 120
@git-bhanu
git-bhanu / woocommerce.md
Last active December 4, 2020 13:25
WooCommerce Learnings resource

This gist will contain all the learnings gathered while working with WooCommerce which we can come back in case of confusion.

Get all the possible materials for a particular type of product which have $maincatergory (say Mens | product_cat) marked in them.

    public static function getMaterials($search_term, $maincategory) {

      $return_arr = a(array());

      $terms = a(array());

      $args  = array(
@git-bhanu
git-bhanu / AjaxSearch.php
Created October 7, 2020 11:45
AjaxSearch.php
<?php
namespace App;
use App\Product;
use function Arrayy\create as a;
function categoryProductSearch() {
// check_ajax_referer('ajax-nonce', 'nonce');
$maincategory = sanitize_text_field($_POST['mainCategory']);