Skip to content

Instantly share code, notes, and snippets.

@miya2000
miya2000 / Cws2Fws.pm
Created May 5, 2009 03:41
Plagger Plugin: convert cws to fws.
package Plagger::Plugin::Filter::Cws2Fws;
require 5.6.0;
use strict;
use base qw( Plagger::Plugin );
use Compress::Zlib;
sub register {
my($self, $context) = @_;
package jstest;
import org.mozilla.javascript.*;
import org.mozilla.javascript.tools.shell.*;
public class JsTest {
public static void main(String[] args) throws Exception {
try {
Context cx = Context.enter();
Global scope = new Global();
<!DOCTYPE html>
<script>
window.onload = function () {
opera.io.webserver.addEventListener('download', download, false);
}
function download(e) {
var req = e.connection.request;
var res = e.connection.response;
if (req.queryItems && req.queryItems.url) {
var url = req.queryItems.url[0];
// ==UserScript==
// @name nicovideo - fix restorePlayer for Opera10.
// @author miya2000
// @namespace http://d.hatena.ne.jp/miya2000/
// @include http://www.nicovideo.jp/watch/*
// @exclude http://*http*
// ==/UserScript==
javascript:(function F() {
if (window.restorePlayer) {
window.restorePlayer = function () {
// ==UserScript==
// @name nicovideo - fix restorePlayer for Opera10.
// @author miya2000
// @namespace http://d.hatena.ne.jp/miya2000/
// @include http://www.nicovideo.jp/watch/*
// @exclude http://*http*
// ==/UserScript==
javascript:(function F() {
if (Element.scrollTo) {
var org_scrollTo = Element.scrollTo;
// ==UserScript==
// @name nicovideo - wnp
// @description windowised nicovideo player.
// @author miya2000
// @namespace http://d.hatena.ne.jp/miya2000/
// @version 1.0.7
// @include http://www.nicovideo.jp/*
// @exclude http://www.nicovideo.jp/watch/*
// @exclude http://*http*
// ==/UserScript==
@if(0)==(0) ECHO OFF
CScript.exe //NoLogo //E:JScript "%~f0" %*
GOTO :EOF
@end
// zip compress command in wsh.
// @see http://scripting.cocolog-nifty.com/blog/2008/06/zip_3cb0.html
// @see http://n-arai.cocolog-nifty.com/blog/2008/04/activeserverpag_d5bc.html
if (WScript.Arguments.Count() < 2) {
using System;
using System.Security.Permissions;
using System.Security;
using System.Diagnostics;
using System.Threading;
using System.Security.Principal;
namespace ConsoleApplication1
{
class Program
public CodeCompileUnit TestGenerate()
{
DeclarationCreator D = new DeclarationCreator();
return D
.Unit()
.Namespace("SuperCodeDom.Hogehoe")
.Import("System")
.Import("System.Linq")
.Type("Hoge")
.Type("Fuga")
(function(){
function X(a, b) {
this.a = a;
this.b = b;
}
var a = new X(1, 1);
var b = new X(1, 1);
alert('[first] ' + (a == b));
X.prototype.toString = function() {