I hereby claim:
- I am boris1993 on github.
- I am boris1993 (https://keybase.io/boris1993) on keybase.
- I have a public key whose fingerprint is AB78 61CE 5606 FA9D 608B AF3F 22F4 4CB1 BAE2 CD9A
To claim this, I am signing this object:
// ==UserScript== | |
// @name 欺骗LeetCode的IP检查 | |
// @namespace com.boris1993 | |
// @version 2024-05-12 | |
// @description 伪造LeetCode的is_china_ip请求的响应,以阻止显示力扣中国横幅及跳转 | |
// @author boris1993 | |
// @license WTFPL | |
// @match https://leetcode.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=leetcode.com | |
// @require https://unpkg.com/xhook@latest/dist/xhook.min.js |
// ==UserScript== | |
// @name 自动跳转到leetcode.com | |
// @namespace https://gist.github.com/boris1993/5eabcb8d10fcd7fc52cf0dbdd0a7a41b | |
// @version 2023-12-25 | |
// @description 在访问leetcode.cn时自动跳转到leetcode.com | |
// @author boris1993 | |
// @license WTFPL | |
// @match https://leetcode.cn/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=leetcode.cn | |
// @grant none |
# First, you must get the previous commit sha, the one before the forced push: | |
## Hit through terminal | |
curl -u <username> https://api.github.com/repos/:owner/:repo/events | |
# Then you can create a branch from this sha: | |
## Hit through terminal | |
curl -u <github-username> -X POST -d '{"ref":"refs/heads/<new-branch-name>", "sha":"<sha-from-step-1>"}' https://api.github.com/repos/:owner/:repo/git/refs |
UPDATE users AS target, users AS source | |
SET target.name_one = source.name_colX | |
WHERE target.user_id = source.user_id |
I hereby claim:
To claim this, I am signing this object:
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' | |
if empty(glob(data_dir . '/autoload/plug.vim')) | |
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' | |
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC | |
endif | |
call plug#begin() | |
Plug 'vim-airline/vim-airline' | |
Plug 'vim-airline/vim-airline-themes' | |
call plug#end() |
@Override | |
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { | |
HttpServletRequest servletRequest = (HttpServletRequest) request; | |
if (servletRequest.getMethod().equals(HttpMethod.OPTIONS.toString())) { | |
((HttpServletResponse) response).addHeader("Access-Control-Allow-Origin", "*"); | |
((HttpServletResponse) response).addHeader("Access-Control-Allow-Methods","GET, OPTIONS, HEAD, PUT, POST"); | |
((HttpServletResponse) response).addHeader("Access-Control-Allow-Headers", ((HttpServletRequest) request).getHeader("Access-Control-Request-Headers")); | |
((HttpServletResponse) response).addHeader("Access-Control-Max-Age", "1800"); | |
HttpServletResponse httpServletResponse = (HttpServletResponse) response; |
/** | |
* This factory generates Jedis connection instances from a Jedis connection pool. <br> | |
* You can put your configurations in <code>redis.properties</code>, which accepts following properties: | |
* <ul> | |
* <li><code>redis.host</code> - Hostname or IP address to the Redis host. Default value is 127.0.0.1. </li> | |
* <li>(Optional) <code>redis.port</code> - Port of the Redis server. Default value is 6379. </li> | |
* <li>(Optional) <code>redis.timeout</code> - Connection timeout in seconds. Default value is 60. </li> | |
* <li>(Optional) <code>redis.auth</code> - Password for this Redis server. Default value is null. </li> | |
* </ul> | |
* |