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
import { serve } from "@hono/node-server"; | |
import { Hono } from "hono"; | |
import { cors } from "hono/cors"; | |
import { SwitchBotOpenAPI } from "node-switchbot"; | |
// fetch RoomInfo | |
const roomInfo = { | |
temperature: 0, | |
humidity: 0, | |
co2: 0, |
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
import { Stack, StackProps, RemovalPolicy } from 'aws-cdk-lib'; | |
import { Construct } from 'constructs'; | |
import * as s3 from 'aws-cdk-lib/aws-s3'; | |
import * as cloudfront from 'aws-cdk-lib/aws-cloudfront'; | |
import * as origins from 'aws-cdk-lib/aws-cloudfront-origins'; | |
import * as acm from 'aws-cdk-lib/aws-certificatemanager'; | |
export interface DotfilesRedirectorStackProps extends StackProps { | |
readonly certificateArn: string; | |
} |
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
// aws-cdk-lib 2.35.0 | |
import { Stack, StackProps, RemovalPolicy, Duration } from 'aws-cdk-lib'; | |
import { Construct } from 'constructs'; | |
import * as s3 from 'aws-cdk-lib/aws-s3'; | |
import * as iam from 'aws-cdk-lib/aws-iam'; | |
export class NasBackupStack extends Stack { | |
constructor(scope: Construct, id: string, props?: StackProps) { | |
super(scope, id, props); |
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
<script type="text/svg" id="user-custom-link-icon-svg"> | |
<!--! Font Awesome Free 6.1.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --> | |
<!-- https://github.com/FortAwesome/Font-Awesome/blob/701d64a8943214b9767733e7ac0b201f1a08a8b3/svgs/solid/link.svg --> | |
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" width="20" height="16"><!--! Font Awesome Free 6.1.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M172.5 131.1C228.1 75.51 320.5 75.51 376.1 131.1C426.1 181.1 433.5 260.8 392.4 318.3L391.3 319.9C381 334.2 361 337.6 346.7 327.3C332.3 317 328.9 297 339.2 282.7L340.3 281.1C363.2 249 359.6 205.1 331.7 177.2C300.3 145.8 249.2 145.8 217.7 177.2L105.5 289.5C73.99 320.1 73.99 372 105.5 403.5C133.3 431.4 177.3 435 209.3 412.1L210.9 410 |
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 | |
BRANCH=$1 | |
FILE_PATH=$2 | |
[ -v $BRANCH ] && BRANCH=$(git branch -l | grep -Ev '^\*' | awk '{ print $1 }' | peco) | |
[ -v $BRANCH ] && echo 'branch not found' && exit; | |
[ -v $FILE_PATH ] && FILE_PATH=$(git ls-files | peco) | |
[ -v $FILE_PATH ] && echo 'file_path not found' && exit; |
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 | |
# LICENSE: MIT | |
SERVICE_NAME="github.com" | |
USER_NAME=$USER | |
usage_exit() { | |
echo "Usage: git new-repo [-u user] [-s service] repo_name" 1>&2 | |
exit 1 |
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 | |
if ! type peco > /dev/null 2>&1; then | |
echo 'peco not found' | |
exit 1; | |
fi | |
COMMAND=$1 | |
[ -v $COMMAND ] && COMMAND="edit" | |
[ -v $TODO_DIR ] && TODO_DIR="$HOME/.todo" |
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/sh | |
##################### | |
# for archlinux 2017/11/05 | |
# depend | |
pacman -S libffi libyaml openssl zlib openssl-1.0 | |
yay -S gcc6 --noconfirm | |
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
const url = require('url'); | |
const https = require('https'); | |
const slack_url = url.parse(process.env.SLACK_URL); | |
const channel = process.env.CHANNEL; | |
const username = process.env.USERNAME; | |
const icon_emoji = process.env.ICON_EMOJI; | |
const messages = { | |
SINGLE : process.env.SINGLE_CLICK_MESSAGE, | |
DOUBLE : process.env.DOUBLE_CLICK_MESSAGE, |
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
yum -y localinstall http://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm | |
# enable the mysql version which you want to test | |
yum-config-manager --disable mysql80-community | |
yum-config-manager --enable mysql56-community | |
yum -y groupinstall "Development Tools" | |
yum -y install tbb tbb-devel cmake boost boost-devel gcc-c++ openssl-devel wget mysql-devel | |
wget https://github.com/Percona-Lab/query-playback/archive/master.zip | |
unzip master.zip | |
cd query-playback-master/ | |
mkdir build_dir |
NewerOlder