Skip to content

Instantly share code, notes, and snippets.

= 使い方

  1. Windows の「スタートアップ」フォルダに fotolife.wsf を入れます
  2. C:\Users\ユーザー名\Pictures\screenshot と C:\Users\ユーザー名\Pictures\screenshot\old というフォルダを作ります
  3. 画像を C:\Users\ユーザー名\Pictures\screenshot に保存します
  4. はてなフォトライフへのアップロードが始まります
  5. 保存した画像は C:\Users\ユーザー名\Pictures\screenshot\old に移されます
  6. はてなフォトライフのページがブラウザで開きます

最初に実行したときにユーザー名とパスワードを聞かれ、入力すると IE のクッキーを使ってログインします。クッキーを削除するとまたログインを求められます。

<!-- fotolife.wsf -->
<job id="InputBoxInJS">
<!-- http://stackoverflow.com/questions/532138/prompt-dialog -->
<script language="VBScript">
Function VBInputBox(promptText)
VBInputBox = InputBox(promptText)
End Function
</script>
<script language="JScript">
We couldn’t find that file to show.
// http://ido.nu/kuma/2007/10/01/diff-onp-javascript-implementation/
/*
Copyright (c) 2007, KUMAGAI Kentaro
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of this project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
// Coffee Script compiler wrapper for WSH JScript (must be placed in the same directory as coffee-script.js)
// Usage: cscript coffee-maker.js [--watch] file
// inspired by http://kennyj-jp.blogspot.com/2011/01/coffeescriptwindows.html
var fs = WScript.CreateObject("Scripting.FileSystemObject");
var scriptPath = WScript.ScriptFullName.slice(
0, -WScript.ScriptName.length);
eval(fs.OpenTextFile(scriptPath + "coffee-script.js", 1).ReadAll());
function compileFile(file) {
// ==UserScript==
// @include http://fastladder.com/reader/
// @include http://reader.livedoor.com/*
// ==/UserScript==
window.opera.addEventListener('BeforeScript',function(e){
if (parseFloat(window.opera.version()) < 11.10) return;
if ((window.location.href.indexOf('http://reader.livedoor.com/') === 0 &&
e.element.src.indexOf('reader_main') > 0) ||
#include <stdio.h>
class Base {
};
class Derived : Base {
public:
void say() {
printf("Derived");
}
#!/usr/bin/env ruby
=begin
Opera's browser.js history in a git tree!
* http://get.geo.opera.com/res/servicefiles/userjsfiles/all/
Requirements:
* Unix-like system (cygwin is fine)
* Ruby
* Git command
// ==UserScript==
// @name defer/async for Opera
// @namespace http://d.hatena.ne.jp/edvakf/
// @include *
// @license Public Domain
// ==/UserScript==
(function() {
var loaded = false;
window.addEventListener('load', function() {
package extensions;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.LinkedList;
import java.util.List;
import java.util.Collections;
import java.util.TreeMap;