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 | |
//外部ファイル(goutte.phar)の呼び出し | |
require_once 'goutte.phar'; | |
use Goutte\Client; | |
//Goutteオブジェクトの生成 | |
$client = new Client(); | |
//配列(URLデータ)の宣言 |
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/python | |
# -*- coding: utf-8 -*- | |
from tweepy.streaming import StreamListener | |
from tweepy import OAuthHandler | |
from tweepy import Stream | |
#key | |
consumer_key = '' | |
consumer_secret = '' |
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
@misc{soumu, | |
author = {総務省}, | |
title = {平成25年通信利用動向調査の結果}, | |
note = {\url{http://www.soumu.go.jp/menu_news/s-news/01tsushin02_02000072.html}}, | |
year = {2014} | |
} |
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
sed -i '' '1s/^/test0/' test.txt |
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 | |
if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
?> | |
<?php | |
$username = array( | |
'name' => 'name', | |
'value' => set_value('name'), | |
'size' => '25', | |
'type' => 'text', |
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
$ su | |
$ yum install gcc gcc-c++ make git openssl-devel freetype-devel fontconfig-devel | |
$ cd /usr/local/src/ | |
$ wget https://phantomjs.googlecode.com/files/phantomjs-1.9.8-linux-x86_64.tar.bz2 | |
$ tar jxfv phantomjs-1.9.8-linux-x86_64.tar.bz2 | |
$ cp phantomjs-1.9.8-linux-x86_64/bin/phantomjs /usr/bin/ |
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
<html> | |
<head> | |
<script src="build/react.js"></script> | |
<script src="build/JSXTransformer.js"></script> | |
</head> | |
<body> | |
<div id="container"></div> | |
<script type="text/jsx"> | |
var App = React.createClass({ | |
render: function(){ |
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 | |
/** | |
** 曜日を色付きで返す | |
*/ | |
public static function getDayOfWeek($date){ | |
$week = array("日", "月", "火", "水", "木", "金", "土"); | |
$w = date("w", strtotime($date)); | |
print($date); | |
if($w == 0){ | |
print("<FONT COLOR=\"RED\">(".$week[$w].")"); |
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
<html> | |
<?php $week = array("日", "月", "火", "水", "木", "金", "土"); ?> | |
<?php $w = date("w", strtotime($date)); ?> | |
<?php if($w == 0): ?> | |
<p><?php echo $date; ?><font color="#ff0000">(<?php echo $week[$w]; ?>)</p> | |
<?php elseif($w == 6): ?> | |
<p><?php echo $date; ?><font color="#0000ff">(<?php echo $week[$w]; ?>)</p> | |
<?php else: ?> | |
<p><?php echo $date; ?>(<?php echo $week[$w]; ?>)</p> |
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
//var | |
var example = 'some string'; | |
//console.log | |
console.log(example); | |
//length | |
console.log(example.length); | |
//random number create |
OlderNewer