Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Frank Huo huoxudong125

I may be slow to respond.
  • China
View GitHub Profile
View Pager.cs
#region 版权信息
// 项目 名称:《Winform分页控件》
// 文 件 名: Pager.cs
// 描 述: 分页控件
// 作 者:kwon yan
using System;
huoxudong125 /
Created Jul 20, 2018
Avoid URL has invalid chars
package com.jst.sys.filter;
import java.util.Enumeration;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
View debugger pause beforeunload
// Run this in the F12 javascript console in chrome
// if a redirect happens, the page will pause
// this helps because chrome's network tab's
// "preserve log" seems to technically preserve the log
// but you can't actually LOOK at it...
// also the "replay xhr" feature does not work after reload
// even if you "preserve log".
window.addEventListener("beforeunload", function() { debugger; }, false)
View Send-File.ps1
Function Send-File {
Sends a file to a remote session.
PS >$session = New-PsSession leeholmes1c23
PS >Send-File c:\temp\test.exe c:\temp\test.exe $session
huoxudong125 /
Created Sep 18, 2017 — forked from magnetikonline/
PowerShell example to copy local files recursively to target server share with orphan cleanup.

PowerShell copy local files recursively to target server

A PowerShell script which provides the following:

  • Mount remote/target server share with given username/password credentials.
  • Copy all $SourcePath files to target share ($TargetServer / $TargetShare) recursively.
  • Finally, clean up all orphaned directories/files from target share.

Usage example

./remotecopy.ps1 `
	-SourcePath "." `
View Get-CredentialFromWindowsCredentialManager.ps1
Gets a PowerShell Credential (PSCredential) from the Windows Credential Manager
Adapted from:
The name of the target login informations in the Windows Credential Manager
View Get-MACVendor.ps1
Find MAC Address Vendors
Lookup Vendor of MAC Address regsitered on (Institute of Electrical and Electronics Engineers) database
MAC address to lookup
View alibaba maven mirror
<name>aliyun maven</name>
View DeployWebAPP2IIS.ps1
function ZipMe {
if (-not $path.EndsWith('.zip')) {$path += '.zip'}
if (-not (test-path $path)) {
set-content $path ("PK" + [char]5 + [char]6 + ("$([char]0)" * 18))
$ZipFile = (new-object -com shell.application).NameSpace($path)
#$input | foreach {$zipfile.CopyHere($_.fullname, 20)}
huoxudong125 / pullToLoadMore.js
Created Jul 27, 2017
上拉加载更多产品,引入Throttle避免部分浏览器触发多次 滚动事件
View pullToLoadMore.js
$(".contain").scroll(function () {
if ($(this).scrollTop() + $(this).innerHeight() > $(this)[0].scrollHeight - 300) {
if (new Date().getTime() - > 2000) { = new Date().getTime();
setTimeout(function () {
console.log(mySpace.currentTabId + " scroll to bottom");
// alert("scroll to bottom"+;
You can’t perform that action at this time.