Skip to content

Instantly share code, notes, and snippets.

View uzulla's full-sized avatar
🚧
WORK,WORK,WORK.

uzulla / Junichi Ishida uzulla

🚧
WORK,WORK,WORK.
View GitHub Profile
@uzulla
uzulla / jquery_if_then.js
Created January 24, 2012 20:10
JQuery add-on that add an If statement
//JQuery add-on that add an If statement
$.fn.ift = function(){
var flag = arguments[0];
var func = arguments[1];
var else_func = arguments[2];
if(flag && $.isFunction(func)){
func.call(this, this);
}else if(!flag && $.isFunction(else_func)){
else_func.call(this, this);
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="./spacer.js"></script>
</head>
<body onload="setSpacer('#FF0000');">
<img src="spacer.js" width=100 height=100 alt=spacer>&lt;=This is Spacer!!!!
</body>
</html>
@uzulla
uzulla / proxyget.php
Created July 3, 2012 08:57
Proxy get
<?php
$url = $_GET['u'];
if( preg_match('/^http:\/\/[a-zA-Z0-9]{1,5}.twimg.com/',$url) ){
$img = file_get_contents($url);
foreach($http_response_header as $head){
if(preg_match('/^Content-Type/',$head)){
header($head);
break;
}
}
@uzulla
uzulla / itms_search_play.html
Created August 4, 2012 14:54
iTunes affiliate search API + Audio tag Player
<html>
<html>
<head>
<title>iTunes affiliate search API + Audio tag Player</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
</head>
<body>
<h1>iTunes affiliate search API+ Audio tag Player</h1>
<script>
function load(){
@uzulla
uzulla / oneshot_s3_permission_changer.pl
Last active December 15, 2015 20:28
One shot S3 permission changer. 一括でS3 のオブジェクトのパーミッションを変更するスクリプト。
#!perl
# one shot s3 permission changer.
# uzulla
use strict;
use warnings;
use utf8;
use FindBin;
use Data::Dumper;
use XML::Simple;
@uzulla
uzulla / peropero.html
Created April 25, 2013 08:54
peropero
<!DOCTYPE html>
<html>
<head>
<title>peropero</title>
<meta property="og:title" content="peropero">
<meta property="og:image" content="./on.png">
<meta property="og:description" content="peroperoします">
<meta name="description" content="peroperoします">
<script src="http://code.jquery.com/jquery.js"></script>
<meta name="viewport" content="width=222">
@uzulla
uzulla / SimpleGlitch.pm
Last active December 17, 2015 09:48
Glitch jpeg, test perl code.
package CFE::Image::SimpleGlitch;
use Mouse;
use File::Slurp;
has raw => (
is => "rw",
);
sub load {
my ($self, $filename) = @_;
@uzulla
uzulla / mysql_data_setup.php
Last active December 19, 2015 22:39
気軽にMysqlのdata_dirを作成して、スタートスクリプトとストップスクリプトと、ごく最低限のmy.cnfを生成します。
<?php
/*
mysql_data_setup.php
https://gist.github.com/uzulla/6028743
HOW TO USE
==========
```
cd ~/mysql-temp # create some dir.
php mysql_data_setup.php # make data_dir, create some script and my.cnf
@uzulla
uzulla / myChain.coffee
Created August 18, 2013 11:47
Coffee scriptでかいた、非同期処理で使うための簡単なライブラリ。 Web SQLのライブラリをCoffeeScriptで書くのに必要だったので書きました、もう使ってない。
class myChain
func_queue: []
index: -1
chain: (func) ->
@func_queue.push(func)
return @
chainExec: () ->
@index++
@uzulla
uzulla / cfewebdb.coffee
Created August 18, 2013 11:56
以前スマホ向けアプリの案件で使った(といっても結局お蔵入りになった)、Web Sql Database をあつかうLibrary、Coffee Scriptです。
###
CFEWebDb
idがPkey
updated_at
created_atは必須
トランザクションには非対応
Ver 1.0 20111206
とりあえずできた。