Skip to content

Instantly share code, notes, and snippets.

View shinshin86's full-sized avatar
👶

Yuki Shindo shinshin86

👶
View GitHub Profile
@shinshin86
shinshin86 / chatgpt-with-qa-format.js
Created December 9, 2022 12:54
Script for displaying the conversing with ChatGPT in the console log in QA format.
// 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'));
@shinshin86
shinshin86 / make_gif.py
Last active June 1, 2022 21:20
Python script to join images together to create a GIF.
from PIL import Image
from os import path
from glob import glob
import sys
##################
# Usage:
# python make_git.py <input_dir_name> <output_filename>
##################
@shinshin86
shinshin86 / google-chrome-profile-backup-on-macos.sh
Created December 16, 2020 01:36
Google Chrome profile backup shell script on macOS
# 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
@shinshin86
shinshin86 / look-back-at-the-GitHub-repository-I-created.sh
Created October 30, 2020 23:46
[Shell scripts for my own use] A command to run to look back at the GitHub repository I created.
curl https://api.github.com/users/shinshin86/repos?sort=created | jq -r '.[] | { full_name: .full_name, created_at: .created_at, url: .html_url}'
@shinshin86
shinshin86 / nextjs-google-analytics-setup-example-with-typescript.tsx
Last active December 4, 2022 00:05
Google analytics setup example at Next.js with TypeScript
// 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 || '',
},
@shinshin86
shinshin86 / check-macos-under-home-filesize.sh
Created August 30, 2020 22:12
Check the file size in under HOME dir at macOS.
sudo du -g -x -d 5 ~/ | awk '$1 >= 5{print}'
@shinshin86
shinshin86 / svg-to-png.sh
Created August 17, 2020 21:23
svg to png (Only available on macOS)
# svg to png (Only available on macOS)
qlmanage -t -o ./ {target svg filename}
@shinshin86
shinshin86 / mysql-sakila-database-on-docker-setup.sh
Created August 3, 2020 14:58
MySQL Sakila Sample Database on Docker(Referring to the Repository of "budougumi0617/mysql-sakila")
#!/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
" -------------------
" 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
@shinshin86
shinshin86 / default-settings-for-my-prettier.txt
Created June 6, 2020 12:16
Default settings for my prettier
##################
# Default settings for my prettier
##################
# Install prettier
```sh
yarn add --dev prettier
```
# Add npm command