Skip to content

Instantly share code, notes, and snippets.

View tittee's full-sized avatar

Wittawat Kittiwarabud tittee

View GitHub Profile
@tittee
tittee / mysqldump.txt
Created November 9, 2020 03:20
mysqldump.txt
cat dump.sql | docker exec -i mysql_container mysql -uroot -pmorph database_name
@tittee
tittee / section-product-lists.liquid
Created September 2, 2020 08:40
Section in shopify
{% assign col = section.settings.select_collection %}
{% assign collection = collections[col] %}
{% paginate collection.products by {{section.settings.prod_per_page}} %}
{% comment %}ly_global_begin{% endcomment %}{% include 'ly-global' %}{% comment %}ly_global_end{% endcomment %}
<div class="wrap-bread-crumb breadcrumb_collection2">
<div class="text-center bg-breadcrumb" style="background-image : url({% if section.settings.bg_breadcrumb != blank %}{{section.settings.bg_breadcrumb | img_url : 'master'}} {% else %}//placehold.it/1920x510 {% endif %})">
<div class="title-page">
<h1 class="">{{page.title}}</h1>
@tittee
tittee / page.collections.liquid
Created September 2, 2020 08:38
Page collection start
{% comment %}ly_global_begin{% endcomment %}{% include 'ly-global' %}{% comment %}ly_global_end{% endcomment %}
{% section 'section-product-lists' %}
@tittee
tittee / main.js
Created March 21, 2020 11:13
Add main.js
// import external dependencies
import 'jquery';
// Import everything from autoload
import './autoload/**/*'
// import local dependencies
import Router from './util/Router';
import common from './routes/common';
import home from './routes/home';
import aboutUs from './routes/about';
/** Populate Router instance with DOM routes */
@tittee
tittee / README-Template.md
Created March 14, 2019 01:53 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@tittee
tittee / docker-cleanup-resources.md
Created December 10, 2018 13:42 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@tittee
tittee / functions.php
Created October 27, 2018 17:00 — forked from mikejolley/functions.php
WooCommerce - Remove product data tabs and hook content in sequence instead
<?php // Do not include this if already open!
/**
* Remove existing tabs from single product pages.
*/
function remove_woocommerce_product_tabs( $tabs ) {
unset( $tabs['description'] );
unset( $tabs['reviews'] );
unset( $tabs['additional_information'] );
return $tabs;
@tittee
tittee / functions.php
Created October 27, 2018 15:46 — forked from kloon/functions.php
WooCommerce Change Description Tab title and heading to product title
<?php
// Change the description tab title to product name
add_filter( 'woocommerce_product_tabs', 'wc_change_product_description_tab_title', 10, 1 );
function wc_change_product_description_tab_title( $tabs ) {
global $post;
if ( isset( $tabs['description']['title'] ) )
$tabs['description']['title'] = $post->post_title;
return $tabs;
}
@tittee
tittee / custom-search-acf-wordpress.php
Last active August 27, 2018 04:02 — forked from charleslouis/custom-search-acf-wordpress.php
PHP - Wordpress - Search - wordpress custom search function that encompasses ACF/advanced custom fields and taxonomies and split expression before request
<?php
/**
* [list_searcheable_acf list all the custom fields we want to include in our search query]
* @return [array] [list of custom fields]
*/
function list_searcheable_acf(){
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF");
return $list_searcheable_acf;
}
# https://git-scm.com/docs/gitignore
# https://help.github.com/articles/ignoring-files
# Example .gitignore files: https://github.com/github/gitignore
/bower_components/
/node_modules/
/admin/
/cgi-bin/
/configuration.php
/css/
/demo/