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
/* | |
Copyright (c) 2006 Tim Kosse | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to | |
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | |
of the Software, and to permit persons to whom the Software is furnished to do | |
so, subject to the following conditions: |
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
OUTPUT_FORMAT("binary") | |
ENTRY(KernelMain) | |
HEAP_SIZE = 0; | |
MMAREA_SIZE = 0; | |
__ctors = ADDR(.ctors); | |
__ctors_count = SIZEOF(.ctors) / 4; | |
SECTIONS |
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
/*入力オブジェクトファイル | |
入力ファイルを増やすときはここに追加*/ | |
INPUT(bootpack.o nasmfunc.o) | |
/*出力オブジェクトファイル*/ | |
OUTPUT(bootpack.bim) | |
/*エントリーポイントファイル | |
これを設定するとstartupルーチンが.textセクションの先頭にくる*/ | |
STARTUP(startup.o) |
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
SECTIONS { | |
/* | |
* .bimのヘッダ | |
*/ | |
.head 0x0 : | |
{ | |
/* | |
* GNU ld version 2.14.90.0.7 20031029では、以下は、なぜか'+ 0'が必要。 | |
* LOADADDR(.text) | |
* ADDR(.text) |
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
OUTPUT_FORMAT("binary"); | |
SECTIONS | |
{ | |
.head 0x0 : { | |
LONG(64 * 1024) /* 0 : stack+.data+heap の大きさ(4KBの倍数) */ | |
LONG(0x69726148) /* 4 : シグネチャ "Hari" */ | |
LONG(0) /* 8 : mmarea の大きさ(4KBの倍数) */ | |
LONG(0x310000) /* 12 : スタック初期値&.data転送先 */ | |
LONG(SIZEOF(.data)) /* 16 : .dataサイズ */ |
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
-- | |
-- 単純な文字列結合の関数 String#join() 相当? | |
-- | |
DROP FUNCTION IF EXISTS concat_as_ymd; | |
CREATE FUNCTION concat_as_ymd(ymd VARCHAR(8)) RETURNS VARCHAR(10) DETERMINISTIC | |
BEGIN | |
RETURN CONCAT_WS('-', SUBSTRING(ymd, 1, 4), SUBSTRING(ymd, 5, 2), SUBSTRING(ymd, 7, 2)); | |
END; |
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
<!DOCTYPE html> | |
<head> | |
<title>ビルド状況</title> | |
<style type="text/css"> | |
body | |
{ | |
margin: 0px; | |
padding: 15px; | |
} |
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
lines = <<'EOS' | |
3 | |
2 | |
4 | |
8 | |
EOS | |
#lines = $stdin.read | |
array = lines.split("\n") |
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
FROM amazonlinux | |
# set yum repository mirror for jp | |
RUN yum -y install yum-plugin-fastestmirror | |
RUN sed -ri 's/#include_only=.nl,.de,.uk,.ie/include_only=.jp/g' /etc/yum/pluginconf.d/fastestmirror.conf | |
# install packages | |
RUN yum -y update | |
RUN yum -y install vim | |
RUN yum -y install passwd openssh openssh-server openssh-clients sudo iproute |
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
Vagrant.configure("2") do |config| | |
config.vm.box = "mvbcoding/awslinux" | |
config.vm.box_version = "2017.03.0.20170401" | |
config.vm.network "forwarded_port", guest: 80, host: 80 | |
# deploy codes | |
config.vm.provision "shell", privileged: false, inline: <<-SHELL | |
whoami #=> vagrant | |
echo $HOME #=> /home/vagrant |