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
# USAGE | |
# docker build -t tzconv . | |
# docker run tzconv "2022-01-01 00:00:00 JST" | |
# | |
# OPTIONAL: set alias to your shell configuration | |
# e.g. alias tzconv="docker run tzconv" | |
FROM ubuntu | |
RUN apt-get update && apt-get install tzdata |
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
# Example: | |
# $ tzconv | |
# 2021-07-22 13:19:25 UTC | |
# 2021-07-22 22:19:25 JST | |
# 2021-07-22 06:19:25 PDT | |
# 2021-07-22 14:19:25 BST | |
# | |
# $ tzconv "2021-01-01 00:00 JST" | |
# 2020-12-31 15:00:00 UTC | |
# 2021-01-01 00:00:00 JST |
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
# Start container: | |
# docker-compose up -d | |
# | |
# Open http://localhost:8888/ in browser and run the samples | |
# | |
# Stop the container: | |
# docker-compose stop | |
# | |
# Stop and remove container, network, etc.: | |
# docker-compose down |
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
# USAGE | |
# ------ | |
# | |
# Please ensure there is that global_bundle volume before execute this script. | |
# | |
# ``` | |
# docker volume create global_bundle --driver local | |
# bash rails-docker-compose-init.sh | |
# docker-compose run web rails new --database postgresql --skip-bundle --force . | |
# # edit your Gemfile and config/database.yml (host, username, password) |
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
""" | |
Find and export senders from gmail by label to senders.csv | |
USAGE: python export_sender_by_label.py LABEL_NAME | |
""" | |
from __future__ import print_function | |
from apiclient.discovery import build | |
from httplib2 import Http | |
from oauth2client import file, client, tools | |
import sys | |
import csv |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"time" | |
"github.com/chromedp/cdproto/cdp" |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"os" | |
"os/signal" | |
"syscall" | |
"github.com/go-fsnotify/fsnotify" |
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
require 'bundler/setup' | |
require 'io/console' | |
require 'utils' | |
DRIVER_PATH = File.absolute_path case Utils::os | |
when :osx | |
'./driver/chromedriver_mac64' | |
when :windows | |
'./driver/chromedriver_win64.exe' | |
when :linux |
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
class CloudFormation { | |
createStack(version: AWSTemplateFormatVersion): CloudFormationStack { | |
return new CloudFormationStack(version); | |
} | |
} | |
class AWSTemplateFormatVersion { | |
private version: string; | |
private constructor(version: string) { | |
this.version = version; |
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 | |
# ./get-awsdocs.sh -o ./wget.log -P ./awsdocs/ | |
wget \ | |
-rpkH \ | |
-l 0 \ | |
-np \ | |
-N \ | |
--reject=.pdf \ | |
--reject-regex=feedback\(yes\|no\) \ | |
--exclude-domains=alas.aws.amazon.com,amp.aws.amazon.com,blogs.aws.amazon.com,console.aws.amazon.com,forums.aws.amazon.com,portal.aws.amazon.com,signin.aws.amazon.com,status.aws.amazon.com \ |
NewerOlder