Skip to content

Instantly share code, notes, and snippets.

@scko823
scko823 / start.sh
Last active July 12, 2019 00:59
`data file` for LetsEncrypt SSL request
sudo yum update -y
# install the certbot via wget
wget https://dl.eff.org/certbot-auto
sudo mv certbot-auto /usr/local/bin/certbot-auto
sudo chown root /usr/local/bin/certbot-auto
sudo chmod 0755 /usr/local/bin/certbot-auto
sudo /usr/local/bin/certbot-auto --nginx --debug
@scko823
scko823 / .editorconfig
Last active April 7, 2019 01:06
EditorConfig + eslint
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
@scko823
scko823 / README.md
Last active August 8, 2021 22:03
a startup script for a GCP CentOS instance

Set metadata for project

gcloud compute project-info add-metadata --metadata GITLAB_CI_RUNNER_REGISTER_TOKEN=XXXXXXXXXXXXX,STARTUP_SCRIPT_LOCATION=XXXXXXXXX,SHUTDOWN_SCRIPT_LOCATION=XXXXXXXXX

copy the about startup.sh to a bucket and use the follow script

gcloud compute instances create "gitlab-runner-$(date +"%m-%d-%Y")" --machine-type e2-micro \
@scko823
scko823 / create-custom-themes-folder.sh
Last active August 6, 2019 04:19
customize zsh-theme wezm to show git commit hash
#! /bin/zsh
# Assuming you have zsh and oh-my-zsh installed
# create custom themes folder in zsh
mkdir -p $ZSH_CUSTOM/themes
cp $ZSH/themes/wezm.zsh-theme $ZSH_CUSTOM/themes
# edit the themes
@scko823
scko823 / .block
Created September 28, 2017 17:39
fresh block
license: mit