View gist:4196588
###check if ruby is installed?
rpm -q ruby
###install ruby
yum install ruby ruby-devel rdoc irb
###install ruby gems
wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
tar xzf rubygems-1.3.5.tgz
View test_viaIsset.php
<?php
$array = array();
$test = '';
// 配列の要素は取り出す前にissetで確認しないとPHP Noticeが出てしまう…
if( isset( $array['key2'] ) ){
$test = $array['key2'];
}
View completeAuthorization.php
<?php
// Base URL
$baseUrl = 'https://api.fitbit.com';
// Request token path
$req_url = $baseUrl . '/oauth/request_token';
// Authorization path
//【変更】
//$authurl = $baseUrl . '/oauth/authorize';
View mecabtest.php
<?php
dl('mecab.so');
$t = new MeCab_Tagger();
$str = 'すもももももももものうち';
echo $t->parse($str);
View require_autoload.php
<?php
require './vendor/autoload.php';
View php_debugbar.volt
<html>
<head>
<?php echo $debugbarHeader ?>
</head>
<body>
<?php echo $debugbarBody ?>
</body>
</html>
View seleniumtest.rb
#!/usr/bin/ruby
require 'rubygems'
require 'selenium-webdriver'
#driver = Selenium::WebDriver.for :ie
caps = Selenium::WebDriver::Remote::Capabilities.internet_explorer(
:javascript_enabled => true)
View seleniumtest_4445.rb
#!/usr/bin/ruby
require 'rubygems'
require 'selenium-webdriver'
#driver = Selenium::WebDriver.for :ie
caps = Selenium::WebDriver::Remote::Capabilities.internet_explorer(
:javascript_enabled => true)
driver = Selenium::WebDriver.for(:remote
View ajax-test.js
/** Ajax POSTテスト */
function ajaxTest(){
$.ajax({
type : "POST",
url : "/test/",
data : {"test":"hoge"},
scriptCharset : "UTF-8",
success : function(msg, status){
var json = eval(msg);