Skip to content

Instantly share code, notes, and snippets.

View usagi's full-sized avatar
🍣
Sushi

USAGI/USAGI.NETWORK usagi

🍣
Sushi
View GitHub Profile
<? phpinfo(); ?>
Hello, world!
<? echo 'Hello, world!' ?>
@usagi
usagi / regex.js
Last active December 14, 2015 15:19
#!/usr/bin/nodejs
var src
= "hoge\n"
+ "hoge\n"
+ "<codeblock>\n"
+ "int main()\n"
+ "{\n"
+ " cout << \"hello\";\n"
+ "}\n"
#include <boost/array.hpp>
#include <boost/assert.hpp>
#include <boost/bind.hpp>
#include <boost/cast.hpp>
#include <boost/checked_delete.hpp>
#include <boost/crc.hpp>
#include <boost/current_function.hpp>
#include <boost/date_time.hpp>
#include <boost/date_time/gregorian/gregorian_types.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
@usagi
usagi / README.md
Last active December 15, 2015 16:28
course materials; php lecture / basic database

Whtat's this?

This is the sample codes for students in a php course.

How to try?

  1. clone the repository.
  2. php -S 0.0.0.0:10080 (PHP >=5.4).
  3. access to http://localhost/00_file.php and the other sample.
@usagi
usagi / talk.sh
Created April 20, 2013 08:24 — forked from brokendish/talk.sh
#!/bin/sh
TMP=~/open-talk.wav
touch $TMP
cd /usr/share/hts-voice/nitech-jp-atr503-m001
#cd /usr/share/hts-voice/mei_happy
echo "$1" | open_jtalk \
-td tree-dur.inf \
-tf tree-lf0.inf \
-tm tree-mgc.inf \
-md dur.pdf \
@usagi
usagi / hello_world.cxx
Created April 26, 2013 14:35
emscripten test result: `em++ hello_world.cxx -o hello_world.js`
#include <iostream>
int main()
{
std::cout << "Hello, JavaScript World from C++\n";
}
#include <boost/network/protocol/http/server.hpp>
namespace http = boost::network::http;
struct handler;
typedef http::server<handler> http_server;
struct handler {
void operator()
( http_server::request const & request
#include <thread>
#include <iostream>
#include <boost/asio.hpp>
int main() try
{
std::cout << "app start\n";
auto run_continues = true;
auto main_task = [&]