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 | |
//URLは画像とリンクを取得したいURLを入れてください。 | |
$url="http://matome.naver.jp/odai/2127242472660703301"; | |
$res=@file_get_contents($url); | |
while($res){ | |
$data=getData($res); | |
for($i=0; $i<count($data["span"]); $i++){ | |
echo "<a href='" . $data["span"][$i]->a["href"] . "'>\n"; | |
echo "<img src='".$data["image"][$i]["src"]."'>\n"; |
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
# coding: utf-8 | |
require 'date' | |
require 'cinch' | |
class HogehogeBot | |
include Cinch::Plugin | |
@@reviewer="誰かな" |
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
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 | |
Error occurred during initialization of VM | |
java.nio.charset.IllegalCharsetNameException: | |
at java.nio.charset.Charset.checkName(Charset.java:273) | |
at java.nio.charset.Charset.lookup2(Charset.java:458) | |
at java.nio.charset.Charset.lookup(Charset.java:437) | |
at java.nio.charset.Charset.defaultCharset(Charset.java:579) | |
at sun.nio.cs.StreamEncoder.forOutputStreamWriter(StreamEncoder.java:37) | |
at java.io.OutputStreamWriter.<init>(OutputStreamWriter.java:94) | |
at java.io.PrintStream.<init>(PrintStream.java:100) |
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
class dev::rbenv { | |
file { ['/usr/local/rbenv', | |
'/usr/local/rbenv/plugins', | |
'/usr/local/rbenv/shims', | |
'/usr/local/rbenv/versions']: | |
ensure => directory, | |
owner => 'vagrant', | |
group => 'vagrant', | |
mode => '0775', |
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 'date' | |
require 'cinch' | |
START_TIME = Time.now | |
$count = 0 | |
class KasumiBot | |
include Cinch::Plugin | |
timer 60, method: :check |
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
file { 'rbenv/profile.d/rbenv.sh': | |
path => '/etc/profile.d/rbenv.sh', | |
content => '## rbenv setting | |
export RBENV_ROOT="/usr/local/rbenv" | |
export PATH="/usr/local/rbenv/bin:$PATH" | |
eval "$(rbenv init -)" | |
', | |
require => Exec['clone rbenv'] | |
} | |
~> |
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 | |
require 'vendor/autoload.php'; | |
use Guzzle\Http\Client; | |
use CommerceGuys\Guzzle\Plugin\Oauth2\GrantType\PasswordCredentials; | |
$settings = parse_ini_file('config/settings.ini'); | |
# Resource Owner Password Credentials Grant | |
$oauth2Client = new Client($settings['base_url'] . '/oauth/token'); |
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 | |
require 'vendor/autoload.php'; | |
use Guzzle\Http\Client; | |
$settings = parse_ini_file('config/settings.ini'); | |
# Resource Owner Password Credentials Grant | |
$client = new Client($settings['base_url']); | |
$params = array( |
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 | |
require 'vendor/autoload.php'; | |
use Guzzle\Http\Client; | |
$settings = parse_ini_file('config/settings.ini'); | |
$client = new Client($settings['base_url']); | |
$client->setDefaultOption('headers', | |
array( |
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 | |
require 'vendor/autoload.php'; | |
use Guzzle\Http\Client; | |
$settings = parse_ini_file('config/settings.ini'); | |
$client = new Client($settings['base_url']); | |
$client->setDefaultOption('headers', | |
array( |
OlderNewer