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 com.example.conf | |
import io.lettuce.core.RedisClient | |
import io.lettuce.core.RedisURI | |
import org.slf4j.LoggerFactory | |
import java.io.FileOutputStream | |
import java.lang.reflect.UndeclaredThrowableException | |
import java.nio.ByteBuffer | |
import java.nio.file.Paths | |
import java.time.Duration |
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
use std::io::Write; | |
use std::path::Path; | |
use std::process::Command; | |
fn main() { | |
let args: std::vec::Vec<String> = std::env::args().collect(); | |
let bin_name = Path::new(&args[0]).file_stem().unwrap(); | |
let mut cmd = Command::new("wsl"); |
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
Array.prototype.zip = function(ano) { | |
return [...Array(Math.min(this.length, ano.length))].map((_, i) => [this[i], ano[i]]); | |
} |
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
export PATH=$(echo $PATH | tr ':' '\n' | grep -v '/mnt' | tr '\n' ':' | head -c-1) | |
# Then we can include any env variable we want, vscode for example | |
# export PATH=$PATH:'/mnt/c/Users/[username]/AppData/Local/Programs/Microsoft VS Code/bin' |
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 getSessionItem(key, remove) { | |
if (!key) { | |
throw new Error(`invalid key: ${key}`); | |
} | |
if (remove === undefined) { | |
remove = true; | |
} | |
let o = window.sessionStorage.getItem(key); | |
if (!o && window.opener) { | |
o = window.opener.sessionStorage.getItem(key); |
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
<el-form :model="formModel" :rules="rules" ref="form"> | |
<el-form-item label="活动名" prop="activity_title"> | |
<el-input v-model="formModel.activity_title" /> | |
</el-form-item> | |
</el-form> | |
import Joi from "@hapi/joi"; | |
import { validator } from "./validator.js"; | |
export default { |
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
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>TagIndicator</title> | |
<style> | |
ul > li { | |
list-style: none; | |
display: inline-block; | |
padding: 5px 8px; |
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
export function spawn<T>( | |
isValid: (value: T) => boolean, | |
msg: string, | |
options?: any, | |
) { | |
return { | |
required: true, | |
trigger: "blur", | |
...options, | |
validator: (_: any, val: T, callback: Function) => { |
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
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Sticky overlap title example</title> | |
<style> | |
.sticky-title { | |
position: sticky; | |
top: 2em; | |
color: goldenrod; |
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
import logo from "./logo.svg"; | |
import "./App.css"; | |
import { useEffect } from "react"; | |
let prevTimestamp: null | number = null; | |
let duration = 0; | |
let animationID = -1; | |
function rotateLogo(timestamp: number) { | |
if (prevTimestamp === null) { |
OlderNewer