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
; % nasm -f bin -o yohooos.img yohooos.asm -l yohooos.lst | |
; 川合秀実著,「OS自作入門」のコードほぼそのまま | |
; TAB=4 | |
ORG 0x7c00 ; このプログラムがどこに読み込まれるのか | |
; 以下は標準的なFAT12フォーマットフロッピーディスクのための記述 | |
start: JMP entry | |
DB 0x90 |
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
; hello-os | |
; TAB=4 | |
; ..\z_tools\nask.exe helloos2.nas helloos.img | |
DB 0xeb, 0x4e, 0x90 | |
DB "HELLOIPL" | |
DW 512 | |
DB 1 | |
DW 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
#include <stdio.h> | |
#include <string.h> | |
// func1 returns a char. | |
char func1() | |
{ | |
return 'a'; | |
} | |
// func2 returns a pointer to char. |
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 zsh | |
if [ $# -ne 2 ]; then | |
echo "$# args specified" 1>&2 | |
echo "usage: sh ./copyDir.sh from_directory to_directory" 1>&2 | |
exit 1 | |
fi | |
from_dir=$1 | |
to_dir=$2 |
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
interval = gets.to_i | |
sec = interval % 60 | |
hour = interval / (60 * 60) | |
min = (interval - (hour * 60 * 60)) / 60 | |
printf("%02d:%02d:%02d", hour, min, sec) |
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 zsh | |
for difffile in *.txt | |
do | |
hms=`sort -n $difffile | awk 'BEGIN{threshold = 1000} $1 < threshold {print $2}' | sort -n | head -n 1 | ruby sec_to_hms.rb` | |
if [[ $hms == "00:00:00" ]] then | |
hms=`sort -n $difffile | awk '{print $2}' | head -n 1 | ruby sec_to_hms.rb` | |
fi | |
echo "$hms ${difffile}" | |
done |
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 zsh | |
if [ $# -ne 2 ]; then | |
echo "$# args specified" 1>&2 | |
echo "usage: sh ./makeDiffs.sh marker_directory target_directory" 1>&2 | |
echo "caution! : the subdirectories of target_directory must be same the marker_directory's subdirectories." | |
exit 1 | |
fi | |
for marker in $1/**/*.png |
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 zsh | |
if [ $# -ne 2 ]; then | |
echo "$# args specified" 1>&2 | |
echo "usage: sh ./diffs.sh marker_filename target_directory" 1>&2 | |
exit 1 | |
fi | |
for target in $2/*.png | |
do |
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 zsh | |
if [ $# -ne 2 ]; then | |
echo "$# args specified" 1>&2 | |
echo "usage: sh ./mp42png.sh mp4_filename output_directory" 1>&2 | |
exit 1 | |
fi | |
( mkdir -p $2 && rm -rf $2 && ffmpeg -i $1 -r 1 -vcodec png $2/%05d.png && mogrify -threshold 50% $2/*.png ) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<style> | |
.button { | |
width: 40%; | |
text-align: left; | |
} | |
</style> |