Skip to content

Instantly share code, notes, and snippets.

View eagleyed's full-sized avatar
🏠
Working from home

Rituparna sonowal eagleyed

🏠
Working from home
  • Individual
  • Kolkata, India
View GitHub Profile

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@eagleyed
eagleyed / docker_wordpress.md
Created May 5, 2020 12:05 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@eagleyed
eagleyed / webpack.config.js
Created June 10, 2020 10:24 — forked from wpscholar/webpack.config.js
Get started with WebPack in WordPress today!
'use strict';
const autoprefixer = require('autoprefixer');
const browsers = require('@wordpress/browserslist-config');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const path = require('path');
const webpack = require('webpack');
module.exports = function (env, options) {
@eagleyed
eagleyed / ssh-digital-ocean
Created June 26, 2020 17:13
SSH first time connection to Digital Ocean Account
Generate the key: ssh-keygen
Point to the directory with your key pair
cd ~/.ssh
locate the pub key for ssh
ssh-copy-id -i [key_name].pub USERNAME@SERVERT_IP
Then
@eagleyed
eagleyed / wc-automatically-complete-orders.php
Created August 7, 2020 10:58
[Frontend Snippets] Automatically complete all orders
/**
* Auto Complete all WooCommerce orders.
*/
add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' );
function custom_woocommerce_auto_complete_order( $order_id ) {
if ( ! $order_id ) {
return;
}
$order = wc_get_order( $order_id );
@eagleyed
eagleyed / class-woocommerce-order-status.php
Created August 13, 2020 18:15 — forked from yratof/class-woocommerce-order-status.php
Custom order status for Woocommerce
<?php
class order_status_customisation {
/**
* Setup actions
*/
static function setup() {
add_action( 'init', __CLASS__ . '::adding_additional_order_statuses', 10 );
add_filter( 'wc_order_statuses', __CLASS__ . '::add_awaiting_shipment_to_order_statuses', 10, 1 );