This file contains 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
#!/usr/bin/env bash | |
set -e | |
set -u | |
set -o pipefail | |
set -C | |
MAILDIR=$HOME/MailBox | |
MTIME=30 |
This file contains 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
#!/usr/bin/env python | |
import os | |
import sys | |
import requests | |
import csv | |
from bs4 import BeautifulSoup | |
URL = "https://jprs.jp/registration/list/meibo/meibo_list_{0}.html" |
We can't make this file beautiful and searchable because it's too large.
This file contains 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
post_id,post_name,post_author,post_date,post_type,post_status,post_title,post_content,post_category,post_tags,custom_field | |
,import-test1,holly,2013/9/13 0:00,post,publish,CSV Import Test1,"This is a post for csv import. | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | |
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",fruits,"apple,banana",this is custom field value. | |
,import-test2,holly,2013/9/13 0:00,post,publish,CSV Import Test2,"This is a post for csv import. | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. | |
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip e |
This file contains 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
#!/usr/bin/env bash | |
set -e | |
if [[ -z "${GLOW_VERSION}" ]]; then | |
GLOW_VERSION=1.5.0 | |
fi | |
DOWNLOAD_URL="https://github.com/charmbracelet/glow/releases/download/v${GLOW_VERSION}/glow_${GLOW_VERSION}_Linux_x86_64.tar.gz" | |
INSTALL_DIR=$HOME/.local/bin | |
if [[ ! -d $INSTALL_DIR ]]; then |
This file contains 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
#!/usr/bin/env bash | |
set -e | |
if [[ -z "$TF_VERSION" ]]; then | |
TF_VERSION=1.4.6 | |
fi | |
DOWNLOAD_URL="https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip" | |
WORK_DIR=$HOME | |
INSTALL_DIR=$HOME/.local/bin |
This file contains 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
#!/usr/bin/env bash | |
set -e | |
set -u | |
set -o pipefail | |
set -C | |
WORK_DIR=$HOME/.cache | |
DOWNLOAD_URL=https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip | |
ZIP_FILE=awscliv2.zip |
This file contains 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
#!/usr/bin/env bash | |
set -e | |
# default variables | |
BACKUP_DIR=$HOME/backup | |
AWSCLI=/usr/local/bin/aws | |
WPCLI=/usr/local/bin/wp | |
DATE=$(date +%Y%m%d%H%M%S) | |
ROTATE=3 |
This file contains 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/bash | |
MODE=$1 | |
#get_instances() { | |
#aws ec2 describe-instances --filter "Name=instance-state-name,Values=${STATE}" "Name=tag:Environment,Values=development" | jq -r '.Reservations[].Instances[] | [ .InstanceId, (.Tags[] | select(.Key == "Name").Value) ] | @csv' | |
#aws ec2 describe-instances --filter "Name=instance-state-name,Values=${state}" "Name=tag:Environment,Values=development" | jq -r '.Reservations[].Instances[] | .InstanceId' | |
#} | |
This file contains 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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": [ | |
"ce:DescribeCostCategoryDefinition", | |
"ce:ListTagsForResource", | |
"ce:GetAnomalySubscriptions", |
This file contains 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
#!/usr/bin/env python | |
# vim:fileencoding=utf-8 | |
import os | |
import json | |
import requests | |
import datetime | |
import time | |
import boto3 | |
import calendar |
NewerOlder