Skip to content

Instantly share code, notes, and snippets.

🐰
うなぎ

Yuki K. kanreisa

🐰
うなぎ
Block or report user

Report or block kanreisa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View (Vuvuzela_jp)post.php
<?php
include('./init.php');
if(!$_SESSION['user']) exit('login.');
/* tweet text */
$A[] = 'ブブ';
$A[] = 'ブー';
$A[] = 'ブォォオ';
$A[] = 'ブォ';
View a2addsite
#!/usr/bin/php -q
<?php
/* a2addsite - てwきwとwうw自分用apache2サイト追加スクリプト */
/* 最初は10行ぐらいだったんだけどねwwwwwwww */
ob_end_clean();
//放り込んでいくディレクトリ(最後にスラッシュ付ける)
$a2confdir = '/etc/apache2/sites-available/';
//DocumentRootが存在しない場合は作成を試みるか
View gist:618047
/*
- API Access -
*/
function makeOAuthSign(pUrl, pParameters)
{
pUrl = oauth.apiroot + pUrl;
// create Array
var accessor = {
consumerSecret : oauth.consumerSecret,
tokenSecret : oauth.tokenSecret
View gist:618548
{
// スライドモーション検出
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 Oct 24, 2010
XMLデータをJavaScriptで扱うためのJSONP変換APIサンプル
View xml2jsonp.php
<?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';
View def.inc.php
<?php
/*
/ >、
厶/vvゝ
|| ・_・リ
川゚O O゚
``
*/
/*
- 定数定義 -
View app.js
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/',
View radio.sock.js
/**
* radio.sock.js (noradi client prototype 0)
* @version 0.0
* @author Yuki KAN <@kanreisa>
**/
Event.observe(window, 'load', init, false);
function init()
{
@kanreisa
kanreisa / gist:923898
Created Apr 17, 2011
ffcopy - 動画ファイルのヘッダを修復する用
View gist:923898
#!/bin/sh
ffmpeg -i $1 -vcodec copy -acodec copy ffcopy_$1
rm $1
mv ffcopy_$1 $1
@kanreisa
kanreisa / app.js
Created May 27, 2011
node.js demo chat
View app.js
/**
* 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){
You can’t perform that action at this time.