Skip to content

Instantly share code, notes, and snippets.

View uplus's full-sized avatar
🌏
Working from the earth

Yuto Ito uplus

🌏
Working from the earth
View GitHub Profile
if let Some(cookies) = req.headers.get::<iron::headers::Cookie>() {
for cookie in cookies.iter() {
// cookie is &String
if let Ok(cookie) = cookie::Cookie::parse(&cookie) {
// cookie is &Cookie
println!("{:?}", cookie);
}
}
};
" set debug=throw
" git ls-files | grep -Ev 'init.vim|.gitignore' | xargs rm
language message C
scriptencoding utf-8
set shell=/bin/sh
let g:netrw_nogx = 1
let g:loaded_node_provider = 0
setup_my_tmp() {
TMPDIR=/private/my_tmp
sudo mkdir -p "${TMPDIR}"
sudo mount_tmpfs "${TMPDIR}"
sudo chmod 1777 "${TMPDIR}"
export TMPDIR
}
if [[ $(stat -c '%a' '/private/my_tmp') = 1777 ]]; then
export TMPDIR='/private/my_tmp'
git rev-list HEAD...master --left-only | git diff-tree --no-commit-id --name-only --stdin | uniq
#!/usr/bin/env node
const readline = require('readline');
const vm = require('vm');
// JSONPのコールバック関数名
const callbackName = process.argv[2];
if (!callbackName) {
console.error('Usage: jsonp-parser <callbackName>');
process.exit(1);
@uplus
uplus / go.mod
Last active August 7, 2024 08:04
sql to ast
module parse-sql
go 1.22.2
require (
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/pingcap/errors v0.11.4 // indirect
github.com/pingcap/log v0.0.0-20191012051959-b742a5d432e9 // indirect
github.com/pingcap/parser v0.0.0-20200623164729-3a18f1e5dceb // indirect
go.uber.org/atomic v1.5.0 // indirect