Skip to content

Instantly share code, notes, and snippets.

public class Cons<A> implements IList<A> {
/**
* リストの先頭要素
*/
private A x;
/**
* リストの残りの要素
*/
private IList<A> xs; // 型変数を忘れないように!
var setControlPanel = function(cmd, title, keystrokes){
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.Run(cmd);
do {
WScript.Sleep(100);
} while(!WshShell.AppActivate(title));
WshShell.SendKeys(keystrokes);
};
setControlPanel("control main.cpl",
(function () {
var fbPage = function () {
var that = {},
_paths = location.pathname.split('/');
var hasUserName = function () {
return _paths.length == 2;
};
var getId = function () {
if (hasUserName()) {
var event = document.createEvent("KeyEvents");
event.initKeyEvent("keypress",
true,
true,
null,
false, // holds Ctrl key
true, // holds Alt key
false, // holds Shift key
false, // holds Meta key
0, // presses a special key, @see http://mxr.mozilla.org/mozilla/source/dom/public/idl/events/nsIDOMKeyEvent.idl
function (ev, arg) {
const MIN_FONT_SIZE = 14, // 最小フォントサイズ
CONFIG_PREFIX = "font.minimum-size.",
COUNTRY_CODES = ["ar", "el", "he", "ja", "ko" , "th", "tr",
"x-armn", "x-baltic", "x-beng", "x-cans", "x-central-euro",
"x-cyrillic", "x-devanagari", "x-ethi", "x-geor", "x-gujr",
"x-guru", "x-khmr", "x-knda", "x-mlym", "x-orya", "x-sinh",
"x-tamil", "x-telu", "x-tibt",
"x-unicode", "x-user-def", "x-western",
"zh-CN", "zh-HK", "zh-TW" ];
@jutememo
jutememo / getFacebookPageFeed.js
Last active December 16, 2015 23:19
Firefox で「混在コンテンツ」をブロックする仕様変更に対する対策。http ではなく、https に接続するように変更した。 cf. https://support.mozilla.org/ja/kb/how-does-content-isnt-secure-affect-my-safety
(function(){
var fbPage = function(){
var that = {},
_paths = location.pathname.split('/');
var hasUserName = function(){ return _paths.length == 2; };
var feed = function(id){
var req = new XMLHttpRequest();
req.onload = function () {
(function(){
var l=location,
fullfeed="http://fulltextrssfeed.com/",
feedly="http://www.feedly.com/home#subscription/feed/";
l.href=feedly+fullfeed+l;
})();
(function(){
var l=location,
feedly="http://www.feedly.com/home#subscription/feed/";
l.href=feedly+l;
})();
var setControlPanel = function(cmd, title, keystrokes){
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.Run(cmd);
do {
WScript.Sleep(100);
} while(!WshShell.AppActivate(title));
WshShell.SendKeys(keystrokes);
};
setControlPanel(WScript.Arguments.item(0),
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.Run(WScript.Arguments.item(0));
WScript.Sleep(500);
WshShell.AppActivate(WScript.Arguments.item(1));
WScript.Sleep(100);
var Keystrokes = WScript.Arguments.item(2)
WshShell.SendKeys(Keystrokes);