This file contains hidden or 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
# Mysqlコンテナを起動 | |
services: | |
mysql: | |
image: mysql:8 | |
container_name: mysql_container | |
environment: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: test | |
ports: | |
- "3306:3306" |
This file contains hidden or 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
AT90S2313ビルド方法 | |
## -Wall : 詳細な警告を全て表示するようにする | |
## -Os : バイナリサイズが小さくなるよう最適化をする | |
## -mmcu=<Name> : プログラムを動かすマイコンを指定 | |
# ビルド | |
avr-gcc -Os -Wall -mmcu=at90s2313 main.c -o test.elf | |
# elfからhexファイル作成 | |
avr-objcopy -I elf32-avr -O ihex test.elf test.hex | |
# メモリ使用量を調べる |
This file contains hidden or 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
#include <xc.h> | |
// 構成ビット設定 | |
#pragma config FOSC = INTOSCIO // 内部クロック使用、RA6, RA7はI/Oとして使用可能 | |
#pragma config WDTE = OFF // ウォッチドッグタイマー無効 | |
#pragma config PWRTE = ON // パワーオンタイマー無効 | |
#pragma config MCLRE = OFF // MCLRピン無効 | |
#pragma config BOREN = OFF // 電源電圧低下検出無効 | |
#pragma config LVP = OFF // 低電圧プログラミング無効 | |
#pragma config CP = OFF // コード保護無効 |
This file contains hidden or 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 cf from 'cloudfront'; | |
const kvsId = '<CloudFrontKeyValueStoreのID>'; | |
// This fails if the key value store is not associated with the function | |
const kvsHandle = cf.kvs(kvsId); | |
// async functionになるので注意! | |
async function handler(event) { | |
// CloudFrontから渡ってくるヘッダからホスト名取得 |
This file contains hidden or 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
'use strict'; | |
const { Mutex } = require( 'await-semaphore' ); | |
/** | |
* スリープ | |
*/ | |
const _sleep = ( waitSec ) => { | |
return new Promise( function ( resolve ) { | |
setTimeout( function () { resolve(); }, waitSec ); | |
} ); |
This file contains hidden or 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
# | |
# この設定を有効化するには、mod_proxyとmod_proxy_httpが必要です。 | |
# | |
ProxyRequests Off | |
ProxyPreserveHost On | |
Listen 8000 | |
<VirtualHost *:8000> | |
ServerName example.com | |
ProxyPass / http://192.168.XXX.XXX:8000/ | |
# ポートベースのProxyなので、Reverseの設定は不要(転送前後でパスが変わらないので) |
This file contains hidden or 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
'use strict'; | |
const AWS = require( 'aws-sdk' ); | |
AWS.config.update( { region: 'ap-northeast-1' } ); | |
const ec2 = new AWS.EC2(); | |
const moment = require( 'moment-timezone' ); | |
/** | |
* 起動しているEC2インスタンスIDを返します。 | |
*/ |
This file contains hidden or 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
'use strict'; | |
/** | |
* 指定した秒数ウエイトします。 | |
* @param {number} waitSec 秒数(ms) | |
*/ | |
const _sleep = ( waitSec ) => { | |
return new Promise( function ( resolve ) { | |
setTimeout( function () { resolve(); }, waitSec ); | |
} ); |
This file contains hidden or 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
# frozen_string_literal: true | |
source "https://rubygems.org" | |
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } | |
# gem "rails" | |
gem 'aws-sdk', '~> 3' | |
gem "activesupport" |
This file contains hidden or 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
# Setting for job sequence. | |
# List up for jpb groups. | |
stages: | |
- check_version | |
- test | |
# Jobs | |
testjob: | |
stage: test |
NewerOlder