Skip to content

Instantly share code, notes, and snippets.


niceguy newpost

View GitHub Profile
newpost / FtpTransfer.cs
Created Oct 18, 2022 — forked from sir4ju1/FtpTransfer.cs
Upload and Download file through FTP in C#
View FtpTransfer.cs
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 / case-sensitive-seach.js
Created Oct 19, 2021 — 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.
View case-sensitive-seach.js
(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 / git_toturial
Created Aug 4, 2021 — forked from guweigang/git_toturial
View git_toturial
git init # 初始化本地git仓库(创建新仓库)
git config --global "xxx" # 配置用户名
git config --global "" # 配置邮件
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@ # clone远程仓库
View useUpdateEffect.hooks.js
function useUpdateEffect(cb: () => void, depend: any[]) {
const [status, setStatus] = useState(false)
useEffect(() => {
if(status) {
} else {
}, depend)
View fileList2Directory.js
function createNode(path, tree) {
const name = path.shift();
const idx = tree.findIndex((e) => {
return === name;
if (idx < 0) {
name: name,
children: [],
leaf: path.length === 0,
View Select位置调整.js
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 ⚛️
View jqgrid-with-search
newpost / index.html
Created Oct 17, 2019
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href=""
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
View designer.html
<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">