This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const nextConfig = { | |
| trailingSlash: true, | |
| images: { | |
| loader: "akamai", | |
| path: "", | |
| }, | |
| }; | |
| module.exports = nextConfig; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cp -a /source/. /dest/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState, useEffect } from "react"; | |
| const GenerateCounter = ({ count, updateCount, ...restProps }) => { | |
| const handleClick = (e) => { | |
| let new_count = count + 1; | |
| updateCount(new_count); | |
| }; | |
| return ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="apiusers_list" _="on htmx:beforeSwap call disposeTooltip() on htmx:afterSwap call handleTableDomUpdated()" | |
| class="content-block overflow-hidden"> | |
| {% include 'drafu/partial/_list_apiusers.html' %} | |
| </div> | |
| <div id="modal_container" _="on htmx:afterSwap call handleModalDomUpdated()"></div> | |
| <form hx-post="{% url 'drafu:apiuser-list' %}" hx-target="#apiusers_list" | |
| _="on htmx:responseError call swapBodyError()"> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| document.querySelector('.btn-create').addEventListener('click', function (e) { | |
| getModalContent(e, this); | |
| }); | |
| // test | |
| var edit_modal_btn_list = document.querySelectorAll('.btn-edit'); | |
| edit_modal_btn_list.forEach(function (edit_btn, index) { | |
| edit_btn.addEventListener('click', function (e) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git rm --cached <file> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| poetry run plum manage shell_plus | |
| u = Member.objects.get(email='user@test.com') | |
| u.set_password("123") | |
| u.save() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function recursiveFind(array, key, value) { | |
| var o; | |
| array.some(function iter(a) { | |
| if (a[key] === value) { | |
| o = a; | |
| return true; | |
| } | |
| return Array.isArray(a.children) && a.children.some(iter); | |
| }); | |
| return o; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { id, ...payload_without_id } = payload; | |
| // use case | |
| updateMilestone({ commit, state, getters }, payload) { | |
| const { id, ...payload_without_id } = payload; | |
| const url = `${base_url}api/milestones/${id}/`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <a-form-model ref="ruleForm" :model="milestone_data" :rules="rules"> | |
| <a-form-model-item ref="name" label="Name" prop="name"> | |
| <a-input v-model="milestone_data.name" /> | |
| </a-form-model-item> | |
| <a-form-model-item ref="start_date" label="Start Date" prop="start_date"> | |
| <a-date-picker v-model="milestone_data.start_date" /> | |
| </a-form-model-item> |