This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
array_diff($values,array("",null)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class SQLDB extends PDO{ | |
public $database_name; | |
public $DSN; | |
public $USER; | |
public $PASS; | |
public function __construct($DSN,$USER=null,$PASS=null){ | |
if($this->is_pear_db_style_dsn($DSN)){ | |
list($DSN,$USER,$PASS) = trans_pear_db_DSN_to_pdo_dsn($DSN); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$file_name = some_function(); | |
//画像タイプ判別 | |
$type_id = exif_imagetype($file_name); | |
$type_name = image_type_to_mime_type($type_id); | |
//var_dump($type_name); | |
//最終更新日を作成(キャッシュ用) | |
$last_modified = filectime($file_name); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'kconv' | |
require 'csv' | |
require 'vpim' | |
$KCODE='u' | |
#Authors:: takuya_1st | |
#Copyright:: @takuya_1st | |
#License:: GPL | |
class CSV | |
## CSVファイルを読み込んで一行目を見出し行として、全部をハッシュに読み込む |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'openssl' | |
require 'open-uri' | |
require 'rubygems' | |
require 'json' | |
if ARGV.size < 1 || ! (/([0-9]+)/ =~ ARGV[0]) | |
puts "Usage : Gist のIDを指定。" | |
puts "以下のように指定" | |
puts " #{__FILE__} https://gist.github.com/3033059 " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'base64' | |
require 'rubygems' | |
require 'mime/types' | |
require 'optparse' | |
##初期化 | |
with=false | |
####引数処理 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -Ku | |
#coding: utf-8 | |
require 'rubygems' | |
require 'net/http' | |
require 'wsse' | |
require 'base64' | |
require 'stringio' | |
require 'pp' | |
class LivedoorBlogAtomPub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iVBORw0KGgoAAAANSUhEUgAAAawAAACTCAIAAABd8bo3AAAYGGlDQ1BJQ0Mg | |
UHJvZmlsZQAAWAmtWWdYFEuz7pnZxJJzFpAMknPOOUqOwpJzWHJWRJQgIEpW | |
yQZEMCBJMiKKqKiAKKIgomIkKAqC3MGj55zv+e79d+d5Zubd6rerq6t6eqZq | |
AeBoIUVEhMB0AISGRZNtjHR5nZxdePEzgAIwAXrADhRI3lEROtbW5uD/PNYm | |
AbTT+EhiR9f/SfvfG+h9fKO8AYCs0WYvnyjvUBS3AIC0e0eQowHA7ugTiIuO | |
2MEFKGYiowaiuG4H+/+F23ew11949BfHzkYP5cwCQKAikcj+AFB/QOW8sd7+ | |
qB4aKgBwDGE+gWFoN14Ua3oHkHwA4PBEOXtCQ8N3cC6KRbz+pcf/X5hE8vpb | |
J4nk/zf+ay5oT3Rg/cCoiBBSwq8f/5+X0JAY1F+/jl3olSoq2NYMvbOgfov3 | |
JhnYopgNxXkBvibmv+VnIqJ1bX7LuwKjTexQzIRyxgNijO1/47cxwfY6KOZC | |
5ZvB4WY7fNRPMFuYl6UVihlQLOAdpYf6fmcsWDExwM7xN8fcx1ffAMXoKoKd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iVBORw0KGgoAAAANSUhEUgAAAawAAACTCAIAAABd8bo3AAAYGGlDQ1BJQ0Mg | |
UHJvZmlsZQAAWAmtWWdYFEuz7pnZxJJzFpAMknPOOUqOwpJzWHJWRJQgIEpW | |
yQZEMCBJMiKKqKiAKKIgomIkKAqC3MGj55zv+e79d+d5Zubd6rerq6t6eqZq | |
AeBoIUVEhMB0AISGRZNtjHR5nZxdePEzgAIwAXrADhRI3lEROtbW5uD/PNYm | |
AbTT+EhiR9f/SfvfG+h9fKO8AYCs0WYvnyjvUBS3AIC0e0eQowHA7ugTiIuO | |
2MEFKGYiowaiuG4H+/+F23ew11949BfHzkYP5cwCQKAikcj+AFB/QOW8sd7+ | |
qB4aKgBwDGE+gWFoN14Ua3oHkHwA4PBEOXtCQ8N3cC6KRbz+pcf/X5hE8vpb | |
J4nk/zf+ay5oT3Rg/cCoiBBSwq8f/5+X0JAY1F+/jl3olSoq2NYMvbOgfov3 | |
JhnYopgNxXkBvibmv+VnIqJ1bX7LuwKjTexQzIRyxgNijO1/47cxwfY6KOZC | |
5ZvB4WY7fNRPMFuYl6UVihlQLOAdpYf6fmcsWDExwM7xN8fcx1ffAMXoKoKd |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eAFzDWJiYGCTamAYBSMyBABvjgE6eAHt0jsKwkAQANAV8R4WFvYeINqIjRCw | |
sZOAIsFPQsyhvYDWJgoKwWglWLyBLXZmP+ybjeehjm41OtWIJnm+39SZlrjX | |
V3lSlGmZZsfVIcnfrYyqZH2m+HOB+NX/cehdzuv0tOunh2Tb8gke/Z9NF5/e | |
VZ0zDmH0aUmzdsyybTNn/nuBZ/9712EIg+W3Gx/9nxablv/xbb86AQIECBAg | |
QIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg | |
QIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg | |
QIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQODfBW50TR65 | |
eAHsnQmcFMXZxntm59q5lvsWARHxCFGiqAQVFBEVEYGgIlEElkNxwWURMMTg | |
xX2LCEQNHiEGjRo/ggSV4BElhhCDBo8YxSNojDGGoDFq8Hueqq7t3tnZ7eql | |
dDrJlL/t6saq6bff91/VdbxVbVnFUNRAUQP/qxrof6QVmWV1tPr3G3IWdBB+ |