Skip to content

Instantly share code, notes, and snippets.

@hiendinhngoc
hiendinhngoc / todo.md
Last active April 23, 2024 07:44
Todo list for shop game - generated by AI

HTML Structure

  1. Create an index.html file and set up the basic HTML structure (head, body, etc.).
  2. Create elements for:
  • Header section (logo, search bar)
  • Game list/gallery container
  • Game item elements (image, title, price, etc.)
  • Genre/category filter buttons container
  • Footer section

HTML Structure - Game Item

@hiendinhngoc
hiendinhngoc / list_api.md
Created June 15, 2023 04:08
List APIs affected by update order item type

List APIs:

  1. Direct
    1. updateOrderItem
  2. Indirect
    1. order_type
      1. cm_sdi_record_type
        1. → cmSdiCreateRecord
        2. → mSdiHeaderMapRecord
  3. → cmSdiProcessRecord
@hiendinhngoc
hiendinhngoc / gift_campaign_progress.md
Created November 29, 2022 08:24
Gift campaignn progress

Overview

  • Thành tích cộng dồn của các chương trình quà tặng type B được lưu vào table gift_campaign_progresses. Mỗi record sẽ tương ứng với 1 chương trình và 1 khách hàng và bao gồm các data field liên quan tới số lượng, doanh số của các mã hàng liên quan đến chương trình (các mã hàng trong gift_condition_items của variant_gift) và số giải thưởng ở các trạng thái khác nhau.

  • Thành tích về doanh số (revenue) sẽ được tính dựa trên giá sau chiết khấu bao gồm thuế của mã hàng mua.

  • Mỗi gift_campaign_progress sẽ có nhiều gift_campaign_progress_items, tương ứng với từng gift_condition_item của chương trình mà KH đã chọn mua. Ví dụ chương trình yeu cầu mua 100c A, B, C để đạt quà. Khách đã mua 200A và 50B, thì sẽ có 2 gift_campaign_progress_items cho A và B, ghi nhận SL và DS đã mua cho 2 mã này. Vì mã C chưa đặt mua, nên sẽ ko có record tương ứng ==> chỉ tạo progress items khi khách đặt mua (hoặc đặt mã hàng vào giỏ hàng) để tránh tình trạng hàng loạt progress items được tạo nhưng ko dc sử

import React from "react"
import PropTypes from "prop-types"
export default class LogIn extends React.Component {
constructor(props) {
super(props);
this.state = {
email: '',
email_ready: undefined,
password: '',

Keybase proof

I hereby claim:

  • I am hiendinhngoc on github.
  • I am hiendinhngoc (https://keybase.io/hiendinhngoc) on keybase.
  • I have a public key ASA0QPOhLfIBYucn6RIOsB7AnpzlRMC3PL7KfWdFagMfiwo

To claim this, I am signing this object:

require 'csv'
start = Date.new(Date.today.year, 1)
finish = Date.new(Date.today.year, 2).end_of_month
#campaigns = Campaign.includes(:transactions).where.not(:transactions => { :id => nil })
transactions = Transaction.joins(:campaign).where.not(campaign_id: nil).where(created_at: start..finish)
column_headers = ["Campaign", "Amount", "Date"]
def download_all_post_contents
posts = @campaign.posts
if posts.present?
folder = "/tmp"
file = "/tmp/archive#{Time.now.to_i}_.zip"
urls = []
posts.each do |post|
urls << post.filestack_image_url if post.filestack_image_url.present?
urls << post.photo_attributes('original')['url'] if post.photo.present?
19-02:
11h-1h: `check the business, show company field for business staff`
20-02:
10h30-12h30: `show the business form when editing user`
23-02:
9h-15h:
```
2. Cho hiển thị trong parttime charges module
3. Xử lý Login giống với Parttime users
4. Xử lý bookings, payments, mailer khi book tương tự parttime

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;