Skip to content

Instantly share code, notes, and snippets.

@nobodyplace
nobodyplace / nico_blogparts.user.js
Created November 3, 2009 07:12
ニコニコ動画のブログ貼り付け用コードを動画画面に表示するGreasemonkey
// ==UserScript==
// @name Nico Blogparts
// @version 0.1.0
// @namespace https://gist.github.com/224859
// @description ニコニコ動画のブログ貼り付け用コードを動画画面に表示するGreasemonkey
// @include http://www.nicovideo.jp/watch/*
// @updated 2011/10/01 15:34:00
// ==/UserScript==
// 0.0.1 - 2009/11/01 リリース
// 0.0.2 - 2009/11/08 チャンネル動画のvideoId(ex. http://www.nicovideo.jp/watch/1255083605)に対応
@nobodyplace
nobodyplace / sleipnir_start_news_mode.user.js
Created November 3, 2009 07:23
Sleipnir Startを表示したとき自動的に人気トピックスを開く
// ==UserScript==
// @name Sleipnir Start: News Mode Starter
// @namespace http://nplll.com/greasemonkeys
// @description Sleipnir Startを表示したとき自動的に人気トピックスを開く
// @version 1.0.0
// @downloadURL https://gist.github.com/raw/224864/sleipnir_start_news_mode.user.js
// @updateURL https://gist.github.com/raw/224864/sleipnir_start_news_mode.user.js
// @include http://www.sleipnirstart.com/*
// @grant none
// @author Ippei "is" Suzuki
@nobodyplace
nobodyplace / Suntime.php
Created November 4, 2009 09:35
Class Calcurate Sunrise / Sunset time
<?php
/**
* Class Calcurate Sunrise / Sunset time
*
* PHP version 5
*
* Licence:
*
* Copyright (c) 2006-2009, Ippei Suzuki <nobodyplace@gmail.com>
* All rights reserved.
@nobodyplace
nobodyplace / function.shorten_url.php
Created November 16, 2009 03:45
Smarty plugin to shorten url with bit.ly
function smarty_function_shorten_url($params, &$smarty)
{
//arguments
if(isset($params['url']) === false)
return null;
$url = $params['url'];
//default domain: bit.ly
//can use j.mp if you specify type
$type = (isset($params['type']) === false || $params['type'] != 'jmp') ?
'bitly' :
@nobodyplace
nobodyplace / MoonAgeTime.php
Created December 1, 2009 17:18
Class Calcurate Moon Age Time
<?php
/**
* Class Calcurate Moon Age Time
*
* PHP version 5
*
* Licence:
*
* Copyright (c) 2006-2009, Ippei Suzuki <nobodyplace@gmail.com>
* All rights reserved.
@nobodyplace
nobodyplace / gist:597606
Created September 26, 2010 04:32
mataniconicomiteruのシンプル版用コード
var w = unsafeWindow;
var subject = w.Video.title;
var url = 'http://nico.ms/' + w.Video.id;
var vinfo = 'watch: ' + subject + ' ' + url + ' #nicovideo #' + w.Video.id;
tw.xhr({
method: 'POST',
url: 'https://twitter.com/statuses/update.json',
headers: {
'Content-type': 'application/x-www-form-urlencoded'
},
@nobodyplace
nobodyplace / tumblr_queue_latest_link.user.js
Last active September 23, 2015 20:57
Tumblr Queueの最新ページへのリンクを生成するGreasemonkey
@nobodyplace
nobodyplace / gist:621841
Created October 12, 2010 08:19
Services_Twitterを使ってダイレクトメッセージ
<?php
//PEAR::Services_Twitter
require_once 'Services/Twitter.php';
//PEAR::HTTP_OAuth::Consumer
require_once 'HTTP/OAuth/Consumer.php';
//instance
$twitter = new Services_Twitter();
$oauth = new HTTP_OAuth_Consumer($consumerKey, $consumerSecret, $authToken, $authTokenSecret);
$twitter->setOAuth($oauth);
//send new direct message
@nobodyplace
nobodyplace / nico_thumbnail.user.js
Created December 21, 2010 10:04
ニコニコ動画の動画ページにサムネイルを表示するGreasemonkey
// ==UserScript==
// @name Nico Thumbnail
// @version 0.0.1
// @namespace http://nplll.com
// @description ニコニコ動画の動画ページにサムネイルを表示するGreasemonkey
// @include http://www.nicovideo.jp/watch/*
// @updated 2010-12-21 19:00:00
// ==/UserScript==
// 0.0.1 - 2010/12/21 リリース
(function(){
var Video = {
v: '1292813028',
id: 'so13075672',
tags: ['\u30a2\u30cb\u30e1' ,'\u4fb5\u7565\uff01\u30a4\u30ab\u5a18' ],
lockedTags: ['\u30a2\u30cb\u30e1' ,'\u4fb5\u7565\uff01\u30a4\u30ab\u5a18' ],
title: '\u4fb5\u7565\uff01\u30a4\u30ab\u5a18\u3000\u7b2c11\u8a71\u300c\u4eba\u5f62\u3058\u3083\u306a\u30a4\u30ab\uff1f\/\u7591\u60d1\u3058\u3083\u306a\u30a4\u30ab\uff1f\/\u767b\u5c71\u3057\u306a\u30a4\u30ab\uff1f\u300d',
description: '\u300c\u4eba\u5f62\u3058\u3083\u306a\u30a4\u30ab\uff1f\u300d<br \/>\u5b50\u4f9b\u306e\u9803\u306b\u5927\u4e8b\u306b\u3057\u3066\u3044\u305f\u3068\u3044\u3046\u4eba\u5f62\u3092\u6804\u5b50\u304c\u5f15\u3063\u5f35\u308a\u51fa\u3057\u3066\u304d\u305f\u3002\u673d\u3061\u305f\u4eba\u5f62\u306e\u4e0d\u6c17\u5473\u306a\u98a8\u8c8c\u3092\u6c17\u5473\u60aa\u304c\u308b\u30a4\u30ab\u5a18\u3060\u3063\u305f\u304c\u3001\u6804\u5b50\u306f\u61d0\u304b\u3057\u3055\u304b\u3089\u90e8\u5c4b\u306b\u98fe\u308b\u3068\u8a00\u3044\u51fa\u3057\u305f\u3002\u305d\u306e\u591c\u3001\u68da\u306b\u7f6e\u3