Skip to content

Instantly share code, notes, and snippets.

View kujiy's full-sized avatar

Kujiy kujiy

View GitHub Profile
@kujiy
kujiy / Terminal.sublime-settings
Last active October 24, 2023 14:18 — forked from branquito/Terminal.sublime-settings
open git bash using `terminal` plugin for sublime
{
// The command to execute for the terminal, leave blank for the OS default
// On OS X the terminal can be set to iTerm.sh to execute iTerm
"terminal": "C:\\Program Files\\Git\\git-bash.exe",
// A list of default parameters to pass to the terminal, this can be
// overridden by passing the "parameters" key with a list value to the args
// dict when calling the "open_terminal" or "open_terminal_project_folder"
// commands
"parameters": ["-c", "cd \"%CWD%\" && \"C:\\Program Files\\Git\\bin\\sh.exe\" -i -l"]
@kujiy
kujiy / git-bash.exe-args
Last active April 20, 2023 13:55
How to open a specific folder with git-bash.exe from a command line(shell)
With argument
"C:\Program Files\Git\git-bash.exe" "--cd=%1"
Direct
"C:\Program Files\Git\git-bash.exe" "--cd="C:\YOUR\FOLDER\"
@kujiy
kujiy / Dockerfile
Last active April 7, 2022 13:09
Dockerfile for Nginx with custom modules
FROM alpine:3.10.1
LABEL maintainer "Adrian B. Danieli - https://github.com/sickp"
EXPOSE 80 443
CMD ["nginx", "-g", "daemon off;"]
ENV NGINX_VERSION 1.19.1
RUN set -ex \
@kujiy
kujiy / Vagrantfile
Last active January 22, 2022 02:02
Vagrantfile
Vagrant.configure("2") do |config|
# config.vm.box = "centos/7"
# 共有フォルダが使えるイメージ
config.vm.box = "geerlingguy/centos7"
config.vm.synced_folder "/Users/<name>/repos", "/repos"
config.vm.provision "shell", inline: <<-SHELL
sudo yum install -y vim net-tools iputils
SHELL
config.vm.define :node1 do |node|
@kujiy
kujiy / gist:2434ffeb724cdfe5169a98618ca1b04b
Last active November 18, 2021 00:36
discussion forum highlight
@-moz-document regexp("https://my.uopeople.edu/mod/.*") {
article > div > article
{
box-shadow: -20px 0 0 #76AFB5
}
article > div > article > div > article
{
box-shadow: -20px 0 0 #AAA
}
}
@kujiy
kujiy / rename.py
Created October 17, 2021 01:58
Rename files in dirs with the dir names
"""
# rename files in dirs
current_dir
|- dir1
|- 001.jpg
|- 002.jpg
|- dir2
|- 001.jpg
|- 002.jpg
@kujiy
kujiy / cent7.sh
Last active October 1, 2021 08:27
Let's Encrypt DST Root CA X3 Expiration: Work Around 1
# cleanup
mv /etc/pki/ca-trust/source/blacklist/* /tmp
mv /etc/pki/ca-trust/source/anchors/* /tmp
# fix the issue
cd /etc/pki/ca-trust/source/blacklist
wget -O dst.pem https://crt.sh/?d=0687260331A72403D909F105E69BCF0D32E1BD2493FFC6D9206D11BCD6770739
cd /etc/pki/ca-trust/source/anchors
wget --no-check-certificate https://letsencrypt.org/certs/isrgrootx1.pem
@kujiy
kujiy / gist:299f5143b6df066b268a36f7fb211e27
Created September 4, 2021 06:52
authorized_keys-from-Github.sh
USER=kujiy
curl -s https://api.github.com/users/$USER/keys | jq -r ".[0].key" > ~/.ssh/authorized_keys
chmod 600 authorized_keys
@kujiy
kujiy / windows-git-init.templatedir-command.bat
Last active March 11, 2021 14:17
git init with templatedir on windows 8.1(64bit)
% git config --global init.templatedir "C:/Users/%username%/.git_template/"
# be careful the things below
-must use " not '
-must use / not \
-needed last / don't omit last /
-don't use baskslash
#-----------------------
✓ okay 1 ✓
@kujiy
kujiy / Makefile
Created November 5, 2020 07:26 — forked from robstradling/Makefile
Parse Chrome EV metadata
chrome_ev:
gcc -o chrome_ev chrome_ev.cc