Skip to content

Instantly share code, notes, and snippets.

View lupinthe14th's full-sized avatar
🦎
I love climbing

Hideo Suzuki lupinthe14th

🦎
I love climbing
View GitHub Profile
@lupinthe14th
lupinthe14th / plain-js-make-image-change-javascript.js
Created September 21, 2020 14:30
Make Image Change javascript (for theme.js file)
/**
SeeAlso:
- https://shopify.dev/tutorials/customize-theme-select-variants-by-clicking-images
- https://gist.github.com/drabbytux/a49215c6d0ba16c4d096a56212bbc4ce
- https://gist.github.com/drabbytux/7f3f2c57c01fcd4baba98668c9473adc
To be placed at bottom of theme.js, or main JS file that doesn't use jquery.
**/
document.addEventListener("DOMContentLoaded", function() {
thumbnails = document.querySelectorAll('img[src*="/products/"]');
function addEventListenerList(thumbnails) {
@lupinthe14th
lupinthe14th / config.fish
Created August 28, 2019 00:54
~/.config/fish/config.fish
# Aliases
alias ls='ls --color=auto'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias vi='nvim'
alias tmux='tmux -2'
# Disable greeting
set fish_greeting
@lupinthe14th
lupinthe14th / .tmux.conf
Last active August 31, 2019 07:33
tmux dotfile
# TC
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ',xterm*:Tc'
# See. https://qiita.com/vimyum/items/44478a51ef3a6f49804f
setw -g allow-rename on
set-option -g set-titles on
set-option -g set-titles-string "#T #{session_alerts}"
# fish
@lupinthe14th
lupinthe14th / ptr.go
Created December 22, 2017 14:27
Lookup addr
package main
import (
"fmt"
"net"
"os"
)
func main() {
addr, err := net.LookupAddr("8.8.8.8")
@lupinthe14th
lupinthe14th / file0.txt
Created February 19, 2014 18:33
AWS free で IPF定量的プロジェクトインストール ref: http://qiita.com/lupinthe14th@github/items/db006324f91981da0ba2
# df -h
Filesystem サイズ 使用 残り 使用% マウント位置
/dev/sda1 7.9G 2.8G 4.7G 38% /
none 308M 0 308M 0% /dev/shm
# resize2fs /dev/sda1
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/sda1 is mounted on /; on-line resizing required
Performing an on-line resize of /dev/sda1 to 7864320 (4k) blocks.
The filesystem on /dev/sda1 is now 7864320 blocks long.