This file contains 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 express = require('express'); | |
const http = require('http'); | |
const cors = require('cors'); | |
// Configure & Run the http server | |
const app = express(); | |
app.use(express.static(__dirname, { dotfiles: 'allow' })); |
This file contains 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
#!/bin/bash | |
if ! [ -x "$(command -v docker-compose)" ]; then | |
echo 'Error: docker-compose is not installed.' >&2 | |
exit 1 | |
fi | |
domains=(example.org www.example.org) | |
rsa_key_size=4096 | |
data_path="./data/certbot" |
This file contains 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
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
# SSL configuration | |
# | |
# listen 443 ssl default_server; | |
# listen [::]:443 ssl default_server; | |
# | |
# Note: You should disable gzip for SSL traffic. |
This file contains 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 getFormattedTime = (dateObj) => { | |
const year = dateObj.getFullYear(); | |
const month = dateObj.getMonth().toString().padStart(2, 0); | |
const date = dateObj.getDate().toString().padStart(2, 0); | |
const hour = dateObj.getHours().toString().padStart(2, 0); | |
const min = dateObj.getMinutes().toString().padStart(2, 0); | |
const sec = dateObj.getSeconds().toString().padStart(2, 0); | |
const result = `${year}-${month}-${date}T${hour}:${min}:${sec}`; | |
return result; | |
}; |
This file contains 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 Select from '../src/component/Select'; | |
function onChange(value) { | |
console.log(`selected`, value); | |
} | |
function onBlur() { | |
console.log('blur'); | |
} |
This file contains 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, { useContext, useState, useEffect, useRef } from 'react'; | |
import { Table, Input, Button, Popconfirm, Form } from 'antd'; | |
const myData = { | |
myData: [ | |
{ | |
key: '1', | |
name: 'John Brown', | |
a: '1', | |
b: '2', | |
c: '3', |
This file contains 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, { useContext, useState, useEffect, useRef } from 'react'; | |
import { Table, Input, Button, Popconfirm, Form } from 'antd'; | |
const EditableContext = React.createContext(); | |
const EditableRow = ({ index, ...props }) => { | |
const [form] = Form.useForm(); | |
return ( | |
<Form form={form} component={false}> | |
<EditableContext.Provider value={form}> |
This file contains 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
var container = document.querySelector('#root > div > div.tw-flex.tw-full-height.tw-full-width > div > div > section > div > div.chat-list.tw-flex.tw-flex-column.tw-flex-grow-1.tw-flex-nowrap.tw-overflow-hidden > div.chat-list__lines.tw-flex-grow-1.scrollable-area > div.simplebar-scroll-content > div'); | |
var observer = new MutationObserver(function() { | |
const content=document.querySelector('.simplebar-content > div> div:nth-last-child(2)').textContent; | |
if(content.indexOf('來抽便便')>1) | |
document.querySelector('#root > div > div.tw-flex.tw-full-height.tw-full-width > div > div > section > div > div.chat-input.tw-block.tw-pd-b-1.tw-pd-x-1 > div:nth-child(2) > div.tw-block.tw-relative.tw-z-default > div > div:nth-child(2) > div > div > textarea').value='!join' | |
document.querySelectorAll('.tw-mg-l-05')[1].querySelector('button').click(); | |
}); | |
observer.observe(container, {subtree: true, childList: true}); |
This file contains 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
//step1:複製下面這段 | |
document.querySelector('.public-activity').style.display='none' | |
//step2: 網頁案f12 選擇console | |
//step3: 把剛剛複製的指令貼上 並且按enter | |
//step4: 完成 |
This file contains 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
FROM node:lastest | |
COPY ./release /app | |
WORKDIR /app | |
ENTRYPOINT node app.js |
NewerOlder