Skip to content

Instantly share code, notes, and snippets.

View katsube's full-sized avatar

Makito Katsube katsube

View GitHub Profile
var Hello = {
World: 'HelloWorld!'
};
alert(Hello.World);
@katsube
katsube / amazonsort.js
Last active December 14, 2015 22:58
Amazon(KDP)の謎ソートを解明する。その1。
console.log(
["愛知県",
"岩手県",
"愛媛県",
"大分県",
"石川県",
"茨城県",
"神奈川県",
"岐阜県",
@katsube
katsube / pjax_mytemplate.js
Last active December 26, 2015 07:39
pjax的な処理を書く際の自分用テンプレートその1
//------------------------------------------------------
// ページ読み込み
//------------------------------------------------------
window.onload(function(){
//-------------------------------
//パスを見て初期化処理振り分け
//-------------------------------
switch( location.pathname ){
case '/page1':
page1.init();
<!DOCTYPE html>
<html>
<head>
<title>Hello, WebVR! - A-Frame</title>
<script src="https://aframe.io/releases/0.6.0/aframe.min.js"></script>
</head>
<body>
<a-scene>
<!-- 立方体/球/円柱 -->
@katsube
katsube / rdb_01.sql
Last active December 10, 2017 12:04
/**
* モバイルプログラミング2
* RDB実習
*/
/*-----------------------------*/
/* 専用のDB作成 */
/*-----------------------------*/
CREATE DATABASE NovelRDB;
USE NovelRDB;
<?php
/*
* [CLI] Create IP address list of request source of Google Apps Script
*
* Copyright (C) 2018 M.Katsube
* This software is released under the MIT License.
* http://opensource.org/licenses/mit-license.php
*/
@katsube
katsube / nodejs_express_port80.js
Last active September 27, 2018 05:30
Nodejs + expressで80番ポートを使用する(一般ユーザー)
/**
* Nodejs + expressで80番ポートを使用する(一般ユーザー)
*
* Usage:
* $ sudo node index.js
* listening on *:80
*
* 親プロセスはrootだが、子プロセスが指定したユーザーになるる。
*/
/**
* モバイルプログラミング2
* SQL実習
*
* Date: 2018-12-10
*/
/* ----------------------------------------- */
/* データベース作成 */
/* ----------------------------------------- */
/**
* JSONデータ保管用の簡易Webサーバ
*/
//--------------------------------------
// モジュール読み込み
//--------------------------------------
const port = 3001;
const app = require('express')();
const http = require('http').Server(app);
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hello FireStore</title>
<style type="text/css">
button{width:100px; height:30px; margin:5px;}
#msg{ display:none; border:1px solid gray; margin:10px; padding:10px; width:600px;}
</style>
</head>