Skip to content

Instantly share code, notes, and snippets.

View abeyuya's full-sized avatar
📛
tofu on fire

abeyuya abeyuya

📛
tofu on fire
View GitHub Profile
@abeyuya
abeyuya / scraping_client.rb
Created May 23, 2015 09:58
nokogiriでプロキシ経由でスクレイピングしたメモ
class ScrapingClient
require 'open-uri'
def get_proxy_host_list
doc = self.get_nokogiri_obj("http://lab.magicvox.net/proxy/")
host_port_list = []
doc_list = doc.css("tr")
@abeyuya
abeyuya / deploy.php
Last active June 14, 2016 12:36
bitbucketからの自動デプロイ ref: http://qiita.com/abeyuya/items/773c26384297efe1f9a1
<?php
if($_SERVER["REQUEST_METHOD"] != "POST"){
// GETによるアクセス
}else{
// POSTによるアクセス
$cmd = '. /var/www/html/update.sh';
$retstr = system($cmd, $res);
$fp = fopen("deploy.log", "a");
fwrite($fp, date('c')."\n");