Skip to content

Instantly share code, notes, and snippets.

View newpost's full-sized avatar
🎯
Focusing

nice guy newpost

🎯
Focusing
  • xi'an
  • 19:25 (UTC +08:00)
View GitHub Profile
@newpost
newpost / FtpTransfer.cs
Created October 18, 2022 07:43 — forked from sir4ju1/FtpTransfer.cs
Upload and Download file through FTP in C#
using System.Net;
using System.IO;
// Upload File to Specified FTP Url with username and password and Upload Directory
//if need to upload in sub folders ///
//Base FtpUrl of FTP Server
//Local Filename to Upload
//Username of FTP Server
//Password of FTP Server
@newpost
newpost / case-sensitive-seach.js
Created October 19, 2021 09:03 — forked from borisdiakur/case-sensitive-seach.js
Bookmarklet for case-sensitive search in Google Chrome (and other browsers which do not ship this feature). You can find install instruction below the code.
(function () {
'use strict';
var body = document.body,
html = document.documentElement;
var docHeight = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
var findingColor = 'limegreen';
@newpost
newpost / git_toturial
Created August 4, 2021 02:50 — forked from guweigang/git_toturial
git命令大全
git init # 初始化本地git仓库(创建新仓库)
git config --global user.name "xxx" # 配置用户名
git config --global user.email "xxx@xxx.com" # 配置邮件
git config --global color.ui true # git status等命令自动着色
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
git config --global color.interactive auto
git config --global --unset http.proxy # remove proxy configuration on git
git clone git+ssh://git@192.168.53.168/VT.git # clone远程仓库
function useUpdateEffect(cb: () => void, depend: any[]) {
const [status, setStatus] = useState(false)
useEffect(() => {
if(status) {
cb()
} else {
setStatus(true)
}
}, depend)
function createNode(path, tree) {
const name = path.shift();
const idx = tree.findIndex((e) => {
return e.name === name;
});
if (idx < 0) {
tree.push({
name: name,
children: [],
leaf: path.length === 0,
import React from "react";
import { css, cx } from "emotion";
import InputLabel from "@material-ui/core/InputLabel";
import MenuItem from "@material-ui/core/MenuItem";
import { createMuiTheme, ThemeProvider } from "@material-ui/core/styles";
import FormControl from "@material-ui/core/FormControl";
import Select from "@material-ui/core/Select";
const theme = createMuiTheme({
overrides: {
// Style sheet name ⚛️
@newpost
newpost / jqgrid-with-search
Created June 9, 2020 03:30
jqgrid-with-search
@newpost
newpost / index.html
Created October 17, 2019 02:46
bootstrap-select支持搜索,动态改变option,支持防抖
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="import" href="../chart-js/chart-js.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-pages/core-pages.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">