Skip to content

Instantly share code, notes, and snippets.

View kanreisa's full-sized avatar
☑️
Busy

Yuki K. kanreisa

☑️
Busy
View GitHub Profile
#!/usr/bin/php -q
<?php
/* a2addsite - てwきwとwうw自分用apache2サイト追加スクリプト */
/* 最初は10行ぐらいだったんだけどねwwwwwwww */
ob_end_clean();
//放り込んでいくディレクトリ(最後にスラッシュ付ける)
$a2confdir = '/etc/apache2/sites-available/';
//DocumentRootが存在しない場合は作成を試みるか
/*
- API Access -
*/
function makeOAuthSign(pUrl, pParameters)
{
pUrl = oauth.apiroot + pUrl;
// create Array
var accessor = {
consumerSecret : oauth.consumerSecret,
tokenSecret : oauth.tokenSecret
{
// スライドモーション検出
document.observe('touchmove',function(e){
//e.preventDefault(); //スクロール禁止
stat.touchmoveFlag = true;
});
// リスト挙動
var target = $$('li.status');
for(var i = 0; i < target.length; i++){
@kanreisa
kanreisa / xml2jsonp.php
Created October 24, 2010 04:37
XMLデータをJavaScriptで扱うためのJSONP変換APIサンプル
<?php
if( ($_GET['xml'])&&($_GET['callback']) )
{
$url = strip_tags($_GET['xml']);
$callback = strip_tags($_GET['callback']);
header('Content-Type: text/javascript; charset=utf-8');
if( $xml = @simplexml_load_file('http://' . $url) ) {
$json = json_encode($xml);
} else {
$json = 'null';
/**
* radio.sock.js (noradi client prototype 0)
* @version 0.0
* @author Yuki KAN <@kanreisa>
**/
Event.observe(window, 'load', init, false);
function init()
{
var http = require('http');
var fs = require('fs');
var sys = require('sys');
var io = require('socket.io');
var port = 13401;
var server = http.createServer(function(req, res){
res.writeHead(301, {
'Content-Type': 'text/html',
'Location': 'http://localhost/',
<?php
/*
/ >、
厶/vvゝ
|| ・_・リ
川゚O O゚
``
*/
/*
- 定数定義 -
@kanreisa
kanreisa / app.js
Created May 27, 2011 09:56
node.js demo chat
/**
* node.js demo chat server (app.js)
**/
var http = require('http');
var io = require('socket.io');
var port = 13902;
var server = http.createServer(function(req, res){
@kanreisa
kanreisa / player.html
Last active September 26, 2015 01:58
reiplayer, version 2.9.0-alpha, released at 2012-12-28
<!DOCTYPE HTML>
<html lang="ja-JP">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>reiplayer/v2.9.0-alpha</title>
@kanreisa
kanreisa / dummy.js
Created June 13, 2011 02:27
Countdown - Call Function When Finished Countdown
/**
* Countdown - Call Function When Finished Countdown
**/
var Countdown = Class.create({
initialize: function(pInitialValue, pFunction){
this.i = pInitialValue;
this.f = pFunction;
},
turn: function(){
--this.i;