This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.devld; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import java.io.*; | |
import java.lang.ref.SoftReference; | |
import java.nio.charset.StandardCharsets; | |
import java.text.ParseException; | |
import java.text.SimpleDateFormat; | |
import java.util.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="zh"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Heart</title> | |
<style> | |
body { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parseURL(url) { | |
const regExp = /^(http|https):\/\/(([a-zA-Z0-9-_.]+)(:(\d{1,5}))?)([^?# ]*)(\?([^?#]*))?(#(.*))?$/ | |
const a = regExp.exec(url) | |
if (!a) return | |
const parsedURL = { | |
schema: a[1], | |
host: a[2], | |
hostname: a[3], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location /_/ { | |
set $location_prefix '/_/'; | |
set $target_uri ''; | |
set $target_host ''; | |
set $target_url ''; | |
access_by_lua_block { | |
local target_uri = ngx.var.request_uri:sub(ngx.var.location_prefix:len() + 1) | |
if (not target_uri:lower():match("^https?://.+")) then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Lrc { | |
constructor(text) { | |
this.lrc = Object.freeze(this._parse(text)) | |
} | |
find(time) { | |
return this.lrc[this.findIndex(time)] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<title>test scan files</title> | |
<style type="text/css"> | |
.zone { | |
width: 400px; | |
height: 400px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Set-NetConnectionSharing { | |
Param( | |
[Parameter(Mandatory=$true)][string] $LocalConnection, | |
[Parameter(Mandatory=$true)][bool] $Enabled, | |
[Parameter(Mandatory=$false)][string] $InternetConnection | |
) | |
Begin { | |
$netShare = $null | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
#NoTrayIcon | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
; Ctrl + Alt + T: 打开 wsl-terminal | |
^!T::OpenWslTerminal() | |
OpenWslTerminal() { |
NewerOlder