Skip to content

Instantly share code, notes, and snippets.

View sailist's full-sized avatar
🏠
Working from home

Haozhe sailist

🏠
Working from home
  • Sophgo
View GitHub Profile
{"version":1,"resource":"file:///Users/yanghaozhe/Documents/timeflow/webview/feedhub-viewv2/node_modules/%40ant-design/icons/lib/icons/StarFilled.d.ts","entries":[{"id":"3Ci5.ts","source":"工作区编辑","timestamp":1652801443655},{"id":"o4b3.ts","source":"工作区编辑","timestamp":1652801554982}]}
@sailist
sailist / example.js
Created December 5, 2019 04:50
JavaScript在光标处插入文字
// JS脚本区域
function insertAtCursor(myField, myValue) {
//IE support
if (document.selection) {
document.selection.empty();
caretPos.text = myValue;
caretPos.select();
myField.focus();
}
//MOZILLA/NETSCAPE support
@sailist
sailist / logwrapper.py
Created January 30, 2020 03:29
LogWrapper
import os
import time
from collections import Iterable, OrderedDict
from datetime import datetime
from typing import Any
class LogParam:
"""
meter = LogParam()
@sailist
sailist / QLabel显示图片
Last active March 26, 2020 11:04
QT快速模板
def show_feature_imgage(self, fname, label):
image = QImage(fname)
label.setPixmap(QPixmap.fromImage(image))
@sailist
sailist / ace-editor.vue
Created March 27, 2020 04:57
ace-editor.vue
<template>
<div ref="root">
</div>
</template>
<script>
var ace = require("ace-builds")
require("ace-builds/webpack-resolver");
const PROPS = {
value: {},
@sailist
sailist / MARC21slim2RDFDC.xsl
Created March 28, 2020 11:36
读取MARC数据?
<xsl:stylesheet xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0" exclude-result-prefixes="marc">
<xsl:import href="MARC21slimUtils.xsl"/>
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="marc:record">
<xsl:variable name="leader" select="marc:leader"/>
@sailist
sailist / markdown_writer.py
Created April 16, 2020 02:10
Markdown Writter
"""
Copyright (C) 2020 Shandong University
This program is licensed under the GNU General Public License 3.0
(https://www.gnu.org/licenses/gpl-3.0.html).
Any derivative work obtained under this license must be licensed
under the GNU General Public License as published by the Free
Software Foundation, either Version 3 of the License, or (at your option)
any later version, if this derivative work is distributed to a third party.
@sailist
sailist / DefaultKeyBinding.dict
Created February 22, 2021 02:04 — forked from trusktr/DefaultKeyBinding.dict
My DefaultKeyBinding.dict for Mac OS X
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more
closely match default behavior on Windows systems. This makes the Command key
behave like Windows Control key. To use Control instead of Command, either swap
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or replace @ with ^ in this file.
Here is a rough cheatsheet for syntax.
Key Modifiers
@sailist
sailist / CriticalSectionLock.cpp
Created March 13, 2021 12:50
Windows MultiThread code
#include <windows.h>
#include <iostream>
#define NAME_LINE 40
using namespace std;
// DataStructure passed in thread
typedef struct __THREAD_DATA
{
int nMaxNum;
char strThreadName[NAME_LINE];
version: '3.9'
services:
v2ray-hk:
image: v2fly/v2fly-core:latest
container_name: v2fly-hk
ports:
- 7889:1087
volumes:
- ./hk:/etc/v2ray/
entrypoint: