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
#[macro_export] | |
macro_rules! lazy_regex { | |
{ $($e:expr)* } => {{ | |
use ::std::sync::LazyLock; | |
use ::regex_lite::Regex; | |
static __RE: LazyLock<Regex> = LazyLock::new(|| { | |
Regex::new(concat!($($e),*)).unwrap() | |
}); |
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 js from '@eslint/js'; | |
import stylistic from '@stylistic/eslint-plugin'; | |
import react from 'eslint-plugin-react'; | |
import ts from 'typescript-eslint'; | |
/** | |
* @type { import("eslint").Linter.Config[] } | |
*/ | |
export default [ | |
js.configs.recommended, |
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
move_chars = [ | |
("([{", 150), | |
(")]}", -150), | |
("〈《「『【〔〖", 150), | |
("〉》」』】〕〗", -150), | |
] | |
keep_puncts_only = True | |
puncts = [ | |
# 这个列表来自 xeCJK 文档 |
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 { | |
ActiveVisit, Errors, FormDataConvertible, Inertia, Method, Page, PendingVisit, Progress, | |
VisitOptions, | |
} from '@inertiajs/inertia'; | |
import { deepKeys, deleteProperty, getProperty, setProperty } from 'dot-prop'; | |
import { produce } from 'immer'; | |
import { identity, isEqual } from 'lodash-es'; | |
import moment, { Moment } from 'moment'; | |
import { SetStateAction, useCallback, useEffect, useMemo, useRef, useState } from 'react'; | |
import { Path, PathValue } from 'util-types'; |
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
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:system="clr-namespace:System;assembly=mscorlib"> | |
<ResourceDictionary.MergedDictionaries> | |
<ResourceDictionary Source="pack://application:,,,/Themes/Base.xaml" /> | |
</ResourceDictionary.MergedDictionaries> | |
<Style x:Key="ItemGlyph" BasedOn="{StaticResource BaseGlyphStyle}" TargetType="{x:Type TextBlock}"> | |
<Setter Property="Foreground" Value="#222222" /> | |
</Style> | |
<Style x:Key="QueryBoxStyle" BasedOn="{StaticResource BaseQueryBoxStyle}" TargetType="{x:Type TextBox}"> |
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 main | |
import ( | |
"fmt" | |
"golang.org/x/image/webp" | |
"image/png" | |
"io/ioutil" | |
"os" | |
"path/filepath" | |
"strings" |
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
(* Higher order derivatives *) | |
Dn[expr_, {x_, n_}] := Nest[D[#, x]&, expr, n] | |
(* This function will not work until corywalker/expreduce#183 is fixed *) | |
TaylorSeries[exp_, {x_, p_, order_}] := | |
Sum[(Dn[exp, {x, n}] /. x->p) * (x-p)^n / (n!), {n, 0, order}] + O[x-p]^(l+1) |
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
server { | |
listen 443 ssl http2; | |
server_name jupyter.example.org; | |
ssl_certificate /etc/letsencrypt/live/jupyter.example.org/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/jupyter.example.org/privkey.pem; | |
include /etc/letsencrypt/options-ssl-nginx.conf; | |
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; | |
add_header Strict-Transport-Security "max-age=31536000" always; |
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
### Keybase proof | |
I hereby claim: | |
* I am balthild on github. | |
* I am balthild (https://keybase.io/balthild) on keybase. | |
* I have a public key whose fingerprint is C98A 963D 6DFD 9E39 8190 671F 1D25 3040 F806 868B | |
To claim this, I am signing this object: |
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
description "shadowsocks-libev" | |
author "Max Lv <[email protected]>" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
# normal exit -9999 | |
env CONFIG="/usr/local/etc/shadowsocks-libev/config.json" |
NewerOlder