Skip to content

Instantly share code, notes, and snippets.

View n0bisuke's full-sized avatar
🌴
On vacation

n0bisuke n0bisuke

🌴
On vacation
View GitHub Profile
<!DOCTYPE html>
<html lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="" type="image/x-icon" />
<link rel="icon" href="" type="image/x-icon" />
<title>ほげほげ</title>
<link rel="stylesheet" type="text/css" href="jquery.css" />
<link href='http://fonts.googleapis.com/css?family=Eater' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="jquery.js"></script>
@n0bisuke
n0bisuke / gist:5692961
Created June 2, 2013 07:55
CoronaSDKでPOSTするサンプル
--CoronaSDKでPOSTの実装
--表示用のテキスト
local myPost = display.newText("(Waiting for response)", 0, 100, native.systemFont, 16)
local function networkListener( event )
if ( event.isError ) then --通信が失敗した場合
myPost.text = "Network error!"
else --通信が成功した場合
myPost.text = event.response
end
end
@n0bisuke
n0bisuke / gist:5706215
Last active December 18, 2015 01:48
coronasdkでhttp通信(GET)をしてJSONを取得してパースする
--[[CoronaSDKでGETの実装+Jsonのパース]]
--表示用のテキスト
local myGet = display.newText("[レスポンス]\n", 70, 10, 200,500, native.systemFont, 20)
local json = require "json"
local function networkListener( event )
if ( event.isError ) then --通信が失敗
myGet.text = "Network error!"
else --通信が成功
local t = json.decode( event.response )
<!doctype html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>TAG index Webサイト</title>
<script type="text/javascript" src="jquery.js"></script>
<script>
$(function(){
$('#reset').on('click', function() {
$("#hirano").text("hiranooooooooooooooooo");
@n0bisuke
n0bisuke / gist:6328243
Created August 24, 2013 13:50
プレドラ
<?php
define("URL", "http://rsk-mac.local:8888/practice/chat.php");
define("TIME", time());
define("__THIS_FILE__", file_get_contents(__FILE__));
define("__THIS_SCRIPT__", substr(__THIS_FILE__, 0, strpos(__THIS_FILE__, "__" . "halt_compiler();") + 19));
$logs = explode("\n", substr(__THIS_FILE__, strpos(__THIS_FILE__, "__" . "halt_compiler();") + 19));
if (strcasecmp($_SERVER['REQUEST_METHOD'], 'post') == 0) {
if (isset($_POST['text']) && !empty($_POST['text'])
&& isset($_POST['name']) && !empty($_POST['name'])) {
@n0bisuke
n0bisuke / hello.php
Created September 26, 2013 03:01
演習1回目のhello worldです.
<?php
echo "hello world";
?>
<input type="text" name="q1">
@n0bisuke
n0bisuke / gisttest.html
Created October 8, 2013 15:53
post to gist from sublime
<!doctype html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<h1>こんな時間にまだ学校いる。</h1>
</body>
</html>
@n0bisuke
n0bisuke / hoge.html
Created October 11, 2013 01:52
gistの
<!doctype html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
</body>
</html>
<h3>[use for()]</h3>
<?php
//配列を用意
$moriken_p[0] = "moriken";
$moriken_p[1] = "e-learning";
$moriken_p[2] = "ganriser";
$moriken_p[3] = "http://sakumon.jp/app";
//配列の中身をforで取得
$count = count($moriken_p); //配列の個数を取得