This file contains hidden or 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 | |
error_reporting(0);// division by zeroのワーニング回避 | |
$expression = array("+","-","*","/",""); | |
for($num = 1000; $num <= 9999;$num++){ | |
foreach($expression as $i){ | |
// 1つめの間 | |
foreach($expression as $j){ | |
// 2つ目の間 |
This file contains hidden or 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 | |
for($i = 10; $i <= 1000; $i++){ | |
if($i == strrev($i) | |
&& decbin($i) == strrev(decbin($i)) | |
&& decoct($i) == strrev(decoct($i))){// 回文数だったら | |
echo $i. "\n"; | |
echo decbin($i). "\n"; | |
echo decoct($i). "\n"; |
This file contains hidden or 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
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo | |
ls -l /etc/yum.repos.d/ | |
rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key | |
yum install jenkins | |
service jenkins start | |
chkconfig jenkins on |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Onsen UI</title> | |
<link rel='stylesheet' href='https://cdn.rawgit.com/OnsenUI/OnsenUI/1.3.11/build/css/onsenui.css' /> | |
<link rel='stylesheet' href='https://cdn.rawgit.com/OnsenUI/OnsenUI/1.3.11/build/css/onsen-css-components.css' /> | |
<script src='https://cdn.rawgit.com/OnsenUI/OnsenUI/1.3.11/build/js/angular/angular.min.js'></script> | |
<script src='https://cdn.rawgit.com/OnsenUI/OnsenUI/1.3.11/build/js/onsenui.min.js'></script> | |
<script> |
This file contains hidden or 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
input { | |
stdin { } | |
} | |
filter { | |
grok { | |
match => { "message" => "%{COMBINEDAPACHELOG}" } | |
} | |
date { | |
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ] |
This file contains hidden or 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
<source> | |
type forward | |
</source> | |
## Processor Server | |
<match apache.access> | |
type bigquery | |
method insert |
This file contains hidden or 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
動的にOnsenUIのコンポーネントを追加したいとき | |
//メニュー画面に遷移するボタンを表示させる | |
var btn = $("<ons-button onclick='quizNavi.resetToPage(\"menu.html\")'>メニューに戻る</ons-button>"); | |
btn.appendTo($("#question")); | |
ons.compile(btn[0]); | |
参考:OnsenUIの要素をJavaScriptで動的に表示する場合 | |
http://mb.cloud.nifty.com/doc/current/tutorial/monaca_quiz_02.html |
This file contains hidden or 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
$curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent2.sh | sh | |
$sudo /opt/td-agent/embedded/bin/fluent-gem install fluent-plugin-parser | |
$sudo /opt/td-agent/embedded/bin/fluent-gem install fluent-plugin-s3 | |
$sudo /opt/td-agent/embedded/bin/fluent-gem install fluent-plugin-bigquery | |
$sudo chmod 755 -R /var/log/httpd/ | |
$sudo vi /etc/td-agent/td-agent.conf | |
### | |
## Output descriptions: |
This file contains hidden or 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
Check! はじめての Fluentd 〜 IAMロールで Amazon EC2 と S3 間をセキュアに | |
http://qiita.com/dz_/items/224607c84112ccafa2d6 | |
AWS EC2上にfluentd + fluent-plugin-twitter + elasticsearch + kibana インストールするメモ | |
http://qiita.com/ayaniimi213/items/4197a295c13b59166e8c | |
This file contains hidden or 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
using UnityEngine; | |
using UnityEditor; | |
using System.Collections; | |
public class BuildBatch : MonoBehaviour { | |
// build iOS app | |
[UnityEditor.MenuItem("Tools/Build Project AllScene iOS")] | |
private static void BuildiOS(){ |