Skip to content

Instantly share code, notes, and snippets.

View cherenkov's full-sized avatar

cherenkov cherenkov

View GitHub Profile
@cherenkov
cherenkov / rss_check.js
Created October 2, 2012 05:38
Javascript / RSS / Limechat 現在使用しているスクリプトの改造.. - 人力検索はてな http://q.hatena.ne.jp/1349127857
// Javascript / RSS / Limechat 現在使用しているスクリプトの改造.. - 人力検索はてな
// http://q.hatena.ne.jp/1349127857
// gede99 @ http://pen2.com/rss_check/
var version = "rss_check.js v0.06";
// チェックするRSSのURLと発言先
var rss_urls={
"http://feedproxy.google.com/hatena/b/hotentry":"#発言先channelA",
class String
def caesar; tr 'a-zA-Z', 'n-za-mN-ZA-M' end
def uncaesar; tr 'n-za-mN-ZA-M', 'a-zA-Z' end
end
print "unccl oveguqnl!".caesar
#パスワードにカエサル暗号(シーザー暗号)を使う。Rubyを使った場合:Garbage In Garbage Out
#http://g1g0.com/2012/01/523/
@cherenkov
cherenkov / comment
Created July 16, 2012 04:07
「・・・Twitter APIを勉強しています」 http://q.hatena.ne.jp/134.. - 人力検索はてな http://q.hatena.ne.jp/1342403785
取り敢えず、前回の質問にあった http://1811way.com/work008/sample&source.txt を動かしてみました。
(回答時はちゃんと読んでいませんでした。スミマセン)
前回のエラーメッセージ、
「Warning: include(HTTP/OAuth/Consumer.php) [function.include]: failed to open stream: No such file or directory in C:\Tools\htdocs\twitterapi\twitter_oauth.php on line 25」
などは、
include 'HTTP/OAuth/Consumer.php';
したときにPEARのパスが通っていなかったのでHTTP_OAuthが読み込めていないというものです。
まずこれを直していきます。
今回、PEARライブラリの導入にpearコマンドは使わない方法で進めます。
(レンタルサーバなどで使えなかったり、コマンド一発でインストールできない場合もあるので)
@cherenkov
cherenkov / hateq20120607.html
Created June 7, 2012 09:05
GoogleMapsAPIで地図を作ってマーカーを立てています。http://wi.. - 人力検索はてな http://q.hatena.ne.jp/1339041535
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Google Spreadsheet ⇒ Google Maps 反映</title>
<meta name="Description" content="" />
<meta name="Keywords" content="" />
</head>
@cherenkov
cherenkov / log201206030130.csv
Created June 2, 2012 16:32
[PHP HTML スクレイピング] あるWEBページの複数データ(例htt.. - 人力検索はてな http://q.hatena.ne.jp/1338651304
1 1(一、いち、ひと、ひとつ)は、最小の正の整数であ...
2 2(二、に、じ、ふた、ふたつ)は、自然数、また整数...
3 3(三、さん、み、みっつ)は、自然数または整数にお...
4 4(四、よん、し、す、よつ、よ)は、自然数および整...
@cherenkov
cherenkov / demo.html
Created June 1, 2012 06:40
javascript DOM で、ノード属性値変更についてですが。 以下のよ.. - 人力検索はてな http://q.hatena.ne.jp/1338473476
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<table>
<thead>
<tr>
<td>タイトル</td>
<td>行追加</td>
@cherenkov
cherenkov / demo.html
Created May 22, 2012 21:48
前質問したときにnextLinkで過去の投稿も取得できるよと教えても.. - 人力検索はてな http://q.hatena.ne.jp/1337720396
<html>
<head>
<title>Google+ API test</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script language="javascript">
var apiKey = 'ここに自分のGoogle API Keyを入れてください';
var counter;
function getActivity() {
req('https://www.googleapis.com/plus/v1/people/' + $('#userId').val() + '/activities/public?maxResults=100&key=' + apiKey);
}
@cherenkov
cherenkov / hateq20120512googleplus.php
Created May 12, 2012 23:01
JSONでデータを読み込んで更新された分だけ追加していきたい Goo.. - 人力検索はてな http://q.hatena.ne.jp/1336822696
<?php
//JSONでデータを読み込んで更新された分だけ追加していきたい Goo.. - 人力検索はてな
//http://q.hatena.ne.jp/1336822696
//APIからつぶやき部分だけを抜き出してファイルにJSONで保存する。
//reference
//https://developers.google.com/+/api/
//https://developers.google.com/+/api/latest/activities
//https://developers.google.com/+/api/latest/activities/list
@cherenkov
cherenkov / fiddle.html
Created May 12, 2012 02:32
pipes / simplexmlで複数サイトのRSSを読みこみ、新着順で表示させる方法.. - 人力検索はてな http://q.hatena.ne.jp/1336407726
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type='text/javascript'>
$(function() {
var feed = [
'http://rss.itmedia.co.jp/rss/1.0/news_security.xml',
'http://michaelsan.livedoor.biz/index.rdf',
@cherenkov
cherenkov / hateq20120508.php
Created May 12, 2012 02:30
simplexmlで複数サイトのRSSを読みこみ、新着順で表示させる方法.. - 人力検索はてな http://q.hatena.ne.jp/1336407726
<?php
$nums = 10; // 1ページの表示件数
$rsslist = array('http://michaelsan.livedoor.biz/index.rdf', // RSSのURLを配列にして代入します。
'http://blog.livedoor.jp/domesaka/index.rdf', // 2件で大丈夫な場合はこの行を削除します。(※行を追加して4件以上にしても大丈夫です。)
'http://news4vip.livedoor.biz/index.rdf');
//デバッグ時はコメントアウトにする。うまくいかなかったらcookieを消す。
session_start(); // ページ遷移ごとにリクエストしないようにセッションを使用します。
header('Content-Type:text/html; charset=UTF-8');