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 'gosu' | |
require 'yaml' | |
Character = Struct.new(:nick_name, :image) | |
Page = Struct.new(:chara, :text) | |
class Script | |
attr_reader :chara | |
attr_reader :pages |
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
# vim: fileencoding=utf-8 | |
s = "\x31\x33\x3A\x35\x39\x3A\x34\x36\x20\x3C\x23\e\x24\x42\x24\x62\x24\x4E\x3D\x71\x24\x2D\e\x28\x42\x3A\x4C\x65\x6F\x5F\x47\x75\x6E\x7A\x3E\x20\e\x24\x42\x21\x44\x21\x44\x24\x3D\x24\x6C\x24\x4F\e\x28\x42\x02\e\x24\x42\x36\x58\x34\x77\e\x28\x42\x0F\e\x24\x42\x21\x4A\x47\x7A\x21\x4B\x21\x64\x24\x4A\x24\x4E\x24\x4F\e\x28\x42" | |
s.force_encoding('ISO-2022-JP') | |
replaced_chars = s.chars.map do |ch| | |
ch.bytes[0] == 0x0F ? "\x18".encode('ISO-2022-JP') : ch | |
end | |
p replaced_chars.join.encode('UTF-8').gsub("\x18", "\x0F") |
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" | |
"github.com/thoj/go-ircevent" | |
"log" | |
"math/rand" | |
"regexp" | |
"strconv" | |
"strings" |
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
CC=gcc | |
CFLAGS=-Wall | |
LIBS=-lwiringPi | |
TARGETS=led-cputemp | |
led-cputemp: led-cputemp.c | |
$(CC) $(CFLAGS) -o $@ $< $(LIBS) | |
all: $(TARGETS) |
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
source 'https://rubygems.org/ | |
gem 'nokogiri' | |
gem 'gviz' | |
gem 'colorable' |
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
CC=gcc | |
CFLAGS=-Wall | |
LIBS=-lpthread | |
TARGETS=pthread-test | |
pthread-test: pthread-test.c | |
$(CC) $(CFLAGS) -o $@ $< $(LIBS) | |
all: $(TARGETS) |
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
<?php | |
# 配列の 0、1 番目を交換する(値渡し) | |
function swap01(Array $array) { | |
$temp = $array[0]; | |
$array[0] = $array[1]; | |
$array[1] = $temp; | |
return $array; | |
} |
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 lang='ja'> | |
<head> | |
<meta charset='UTF-8'> | |
<title>Hello World</title> | |
</head> | |
<body> | |
<!-- https://github.com/uei/enchant.js-builds/blob/master/build/enchant.js からダウンロードしてくる --> | |
<script src='enchant.js'></script> | |
<script src='main.js'></script> |
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 <stdlib.h> | |
#include <string.h> | |
enum state { STATE_A, STATE_B, STATE_C }; | |
// 状態 A〜C の処理 | |
void a(void); | |
void b(void); |
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 lang="ja"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>K & R</title> | |
</head> | |
<body> | |
<p>K & R(けーあんどあーる)</p> | |
</body> | |
</html> |