Skip to content

Instantly share code, notes, and snippets.

@dearmark
dearmark / 0_reuse_code.js
Last active August 29, 2015 14:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@dearmark
dearmark / proxy.pac
Last active February 24, 2016 03:18
// Generated by gfwlist2pac
// https://github.com/clowwindy/gfwlist2pac
var domains = {
"ggpht.com":1,
"gimpshop.com": 1,
"directcreative.com": 1,
"speedpluss.org": 1,
"mingpaovan.com": 1,
"wikinews.org": 1,
rustup component add rust-src
export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src"
@dearmark
dearmark / form-index.vue
Created November 19, 2021 03:20
[vben 表单数据填充] vben代码记录 #vue #vben
onMounted(async () => {
// const data = await accountInfoApi();
if (taskId.value !== undefined) {
const data = await getTask(taskId.value);
// task.then((result) => {
// bodyList = result.body;
// });
setFieldsValue(data);
}
});
@dearmark
dearmark / mypoly.json
Last active May 18, 2022 06:22
poly.json
[
{
"id": "1",
"title": "Carpet",
"shape": "poly",
"name": "1",
"fillColor": "#00ff194c",
"strokeColor": "black",
"coords": [264, 332, 319, 320, 328, 332, 338, 386, 276, 402, 264, 332],
"polygon": [
@dearmark
dearmark / Readme.md
Created September 8, 2022 05:14 — forked from OlivierLDff/Readme.md
🚀 Git Bash Emojis (Windows)

Open git bash with admin privilege.

cd "C:/Program Files/Git/usr/share/mintty"
mkdir -p emojis
cd emojis
curl https://raw.githubusercontent.com/wiki/mintty/mintty/getemojis > getemojis
./getemojis -d
@dearmark
dearmark / gist:60d377c6abdfb57725f5d27132d1e09e
Last active July 16, 2024 07:49
columns多语言转化
function printC(list, flag) {
let columns = {};
let columnsI = [];
list.map((item) => {
columns[item.dataIndex] = item.title;
item.title = `t('${flag}.${item.dataIndex}')`;
});
console.log(columns);
console.log(list);
}
@dearmark
dearmark / table.ts
Last active July 26, 2024 06:42
ant-design-vue 表格动态合并单元格
function dynamicMergeCells(dataSource: [], index: number, key: string) {
const data = dataSource.map((item) => item[key]);
const result = [] as any;
let count = 1;
for (let i = 1; i < data.length; i++) {
if (data[i] == data[i - 1]) {
count++;
result.push({