This file contains hidden or 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
/** | |
* ChatGPT conversation downloader | |
* | |
* Usage: | |
* 1. Open the ChatGPT page. | |
* 2. Open the console from your browser's developer tools (DevTools for Chrome), paste this script and run it. | |
* 3. Next, run `download()` with the conversation you want to download selected from the history. | |
* 4. The conversation will then be downloaded as a text file. | |
* 5. The title of the text file will be the title name in the history. | |
* |
This file contains hidden or 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
// USAGE: After conversing with ChatGPT, run this code on the Chrome developer console. | |
const textList = [] | |
document.querySelectorAll('.text-base').forEach((t, i) => { | |
textList.push(`${i % 2 === 0 ? "Q:" : "A:"} ${t.textContent}`) | |
}) | |
console.log(textList.join('\n')); |
This file contains hidden or 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
from PIL import Image | |
from os import path | |
from glob import glob | |
import sys | |
################## | |
# Usage: | |
# python make_git.py <input_dir_name> <output_filename> | |
################## |
This file contains hidden or 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
# Google Chrome | |
zip -r chrome-profile-bk ~/Library/Application\ Support/Google/Chrome | |
# Google Chrome Canary | |
zip -r chrome-canary-profile-bk ~/Library/Application\ Support/Google/Chrome\ Canary |
This file contains hidden or 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
curl https://api.github.com/users/shinshin86/repos?sort=created | jq -r '.[] | { full_name: .full_name, created_at: .created_at, url: .html_url}' |
This file contains hidden or 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
// pages/_document.tsx | |
// And setup to next.config.js ↓↓↓ | |
/* | |
module.exports = { | |
publicRuntimeConfig: { | |
TRACKING_ID: process.env.TRACKING_ID || '', | |
}, | |
serverRuntimeConfig: { | |
TRACKING_ID: process.env.TRACKING_ID || '', | |
}, |
This file contains hidden or 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
sudo du -g -x -d 5 ~/ | awk '$1 >= 5{print}' |
This file contains hidden or 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
# svg to png (Only available on macOS) | |
qlmanage -t -o ./ {target svg filename} |
This file contains hidden or 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
#!/bin/sh | |
# Sakila Sample Database: https://dev.mysql.com/doc/sakila/en/ | |
# Use Repository: https://github.com/budougumi0617/mysql-sakila | |
git clone https://github.com/budougumi0617/mysql-sakila.git | |
# Use version of 5.7 | |
cd mysql-sakila/5.7 |
This file contains hidden or 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
" ------------------- | |
" Basic settings | |
" ------------------- | |
" The indentation of the new line, the same as the current line. | |
set autoindent | |
" To specify a directory of backup files. | |
set backupdir=$HOME/vimbackup | |
" To work the clipboard and Windows |