Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script>
$(function(){
var host = "ws://localhost:8888/";
var socket = new WebSocket(host);
index_by (rails)
group_by
@sadah
sadah / NewClass.java
Created January 31, 2013 11:13
Java♡HTML5 Night でライブコーディングしたJavaのWebSocketのサンプルコード。 ライブコーディングなので、いろいろ適当ですが。
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package websocket.sample;
import javax.websocket.Session;
import javax.websocket.WebSocketEndpoint;
import javax.websocket.WebSocketMessage;
@sadah
sadah / index.html
Created January 31, 2013 11:15
Java♡HTML5 Night でライブコーディングしたクライアントサイドのWebSocketのサンプルコード。 ライブコーディングなので、いろいろ適当ですが。
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script>
$(function(){
var host = "ws://localhost:8080/WebApplication3/echo";
var socket = new WebSocket(host);
@sadah
sadah / gist:4682243
Last active December 12, 2015 00:18
Java♡HTML5 Night WebSocketのセッションで紹介したいろいろ

Java♡HTML5 Night WebSocket

セッションで紹介したいろいろ。

Profile

なにか質問があれば @sada_h に。

Versions

@sadah
sadah / b64e2.rb
Created February 23, 2013 06:25
b64e2.rb encode file to base64(data URL Scheme). b64e2.rb make "base64" directory and write encoded file. usage ruby b64e2.rb [filename]
require 'base64'
require 'mime/types'
def print_usage
puts <<EOS
b64e2.rb encode file to base64(data URL Scheme).
b64e2.rb make "base64" directory and write encoded file.
usage
@sadah
sadah / gist:5877328
Created June 27, 2013 15:16
install ruby 2.0 and rails 4. scaffold user.
brew update
brew upgrade rbenv
rbenv install -l
rbenv install 2.0.0-p195
rbenv global 2.0.0-p195
rbenv rehash
ruby -v
gem search rails
gem install rails
rails -v
@sadah
sadah / HTML5forBeginners.md
Created June 28, 2013 12:47
HTML5とか勉強会 for ビギナー (第2回) のアジェンダ http://atnd.org/event/beginner5j02?vos=cpatnsoccap0111026001

初めてのHTML5(概念・なにができるの?)

Profile

  • 自己紹介

Questions

ざっくりどんなひとたちが来てるか、ふだん何しているか聞く。

@sadah
sadah / gist:6524303
Created September 11, 2013 14:20
first git
ファイル修正して、git statusで確認して、git add -Aで変更をローカルに追加する。
git statusで確認して、git commit -m 'test commit.'でコミットして、git pushでgitに反映させる。
⨠ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: README.md

github pages での静的ファイルの公開方法

github pagesはちょっとしたホスティングサービスみたいに使える。

スライドのほとんどを、HTMLとJavaScriptで作っている。使うライブラリはそのときどきで違ったけど、こういった作り方をはじめてもう3年くらい。

以前は Google Code においていて、いまは github pages に置いている。どちらもWebに公開する機能があったので、バージョン管理しながらスライドのホスティングもできる。

メリットはいろいろある。