Skip to content

Instantly share code, notes, and snippets.

View seiyeah78's full-sized avatar
😱
OMG!!!

karasu seiyeah78

😱
OMG!!!
View GitHub Profile
@seiyeah78
seiyeah78 / sample.sh
Created December 12, 2023 08:57
[jq, shellscript, json] diff json 2 variables.
diff <(jq --sort-keys . <<< ${current_json}) <(jq --sort-keys . <<< ${new_json}) || {
echo "Found diff."
}
@seiyeah78
seiyeah78 / sample.js
Last active March 27, 2023 10:47
[tampermonkey, javascript] chat gpt prompt width
// ==UserScript==
// @name ChatGPT Prompt Width
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://chat.openai.com/*
// @grant none
// ==/UserScript==
@seiyeah78
seiyeah78 / sample.py
Created April 19, 2022 08:01
[jupyter notebook] change cell height
from IPython.display import HTML
# セルがmax-height 200pxなので広くする
# 参考 https://stackoverflow.com/questions/65921736/how-to-resize-the-scrolling-output-height-in-jupyterlab-notebook
display(HTML("<style>.jp-CodeCell.jp-mod-outputsScrolled .jp-Cell-outputArea { max-height: 4000px; }</style>"))
@seiyeah78
seiyeah78 / request_sample.py
Created February 14, 2022 06:46
[python] requests verbose
import requests
import logging
# These two lines enable debugging at httplib level (requests->urllib3->http.client)
# You will see the REQUEST, including HEADERS and DATA, and RESPONSE with HEADERS but without DATA.
# The only thing missing will be the response.body which is not logged.
try:
import http.client as http_client
except ImportError:
# Python 2
@seiyeah78
seiyeah78 / goroutine_concurrency_with_channel.go
Last active December 14, 2022 10:29
[golang go] structとchannelを使った並列処理
package main
import (
"fmt"
"sync"
"time"
)
func main() {
list := []string{"foo", "bar", "buzz", "one", "three", "two", "seven"}
@seiyeah78
seiyeah78 / example.txt
Last active May 12, 2020 07:06
sed using "OR" and replace
sed -i -e "/foo/d" -e "/bar/d" $YOUR_FILE_NAME
@seiyeah78
seiyeah78 / hoge
Created January 29, 2020 11:24
fuga
hoge
@seiyeah78
seiyeah78 / pr_tmplate.md
Last active May 22, 2020 18:08
OSS Pull Request Template

Description

filetype is "eruby" when I open file "test.erb"

Process

I checked in the following steps.

  1. type nvim -N -u .test_vimrc -i NONE test.erb
  2. move cursor to = of <%= 'Hello, World!' %>
  3. execute :Switch command.
@seiyeah78
seiyeah78 / .zshrc
Created September 23, 2015 05:41
pecoを使ってrbenvのRubyのバージョンを切り替えやすくする ref: http://qiita.com/KetSwaps7/items/a14267c1ec2fc3568a7c
alias rvgp='rbenv global "$(rbenv versions | egrep -o "[0-9].*[0-9]|system" | peco)";rbenv rehash; rbenv version;'