Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name hide diary of the future for d:id:ripjyr
// @namespace http://d.hatena.ne.jp/ripjyr/
// @description hide diary of the future
// @include http://d.hatena.ne.jp/ripjyr/
// ==/UserScript==
(function(){
// hide diary of the future
var today = new Date();
today = today.getFullYear() + ("0" + (today.getMonth()+1)).substr(-2) + ("0" + today.getDate()).substr(-2);
しかし寒くなってきましたね。
ネットウォッチ対象には
ばかな人ばっかりですが、
いちばんtokuhiromが素敵です。
いちばんtokuhiromが素敵です。
のように、大事なことは
にかい言うようにします。
#include <windows.h>
#include <tlhelp32.h>
#include <stdio.h>
DWORD getppid()
{
HANDLE hSnapshot = INVALUD_HANDLE_VALUE;
PROCESSENTRY32 pe32;
DWORD ppid = 0, pid = GetCurrentProcessId();
// Running JSDeferred on WSH
var _util = { cat : function(f){return (new ActiveXObject("Scripting.FileSystemObject")).OpenTextFile(f,1,false).ReadAll();} };
// fake window, fake document, and other global object
(function(){
if( typeof( document ) == "undefined" ){
document = new ActiveXObject( "htmlfile" );
document.write("<html></html>");
}
if( typeof( window ) == "undefined" ) window = document.parentWindow;
if( typeof( alert ) == "undefined" ) //alert = window.alert;
// Running JSDeferred on WSH
var _util = {
cat : function(f){
if(f.match(/^(https?|file):/)) {
var xhr = new ActiveXObject("Microsoft.XMLHTTP");
xhr.open("GET", f, false);
xhr.send();
return xhr.responseText;
}
return (new ActiveXObject("Scripting.FileSystemObject")).OpenTextFile(f,1,false).ReadAll();
// ==UserScript==
// @name fix-perlcodesample-date
// @namespace http://d.hatena.ne.jp/perlcodesample/
// @include http://d.hatena.ne.jp/perlcodesample/*
// ==/UserScript==
(function(){
GM_xmlhttpRequest( {
method : "get",
url : "http://d.hatena.ne.jp/perlcodesample/rss",
@hasegawayosuke
hasegawayosuke / foo.cxx
Created February 25, 2010 06:17 — forked from mattn/foo.cxx
/*
fix: error C2016: C では、構造体または共用体に少なくとも 1 つのメンバが必要です。
struct function {
};
*/
typedef void functon;
function foo() {
}
'Erase alt text of images from pptx
Option Explicit
Private Sub delAlt(sh As Shape)
Dim s As Shape
sh.AlternativeText = ""
On Error GoTo trap
For Each s In sh.GroupItems
Call delAlt(s)
@hasegawayosuke
hasegawayosuke / how-to-write-advent-calendar.txt
Created December 1, 2010 02:06
How to write Perl Advent Calendar article
Perl Advent Calendar 書き方 (2010年版)
このドキュメントは、perl-users.jp で公開されている Advent Calendar のwriter向けに
カレンダー記事の公開方法について説明したものです。
2010年版 Advent Calendar は、一般利用者に対しては以下のURLで公開されます。
http://perl-users.jp/articles/advent-calendar/2010/
トラックは以下のものがあります。
--- C:/tmp/frepan.v16.org.js Tue Jan 25 12:35:53 2011
+++ C:/tmp/frepan.js Tue Jan 25 12:39:39 2011
@@ -86,13 +86,24 @@
}
__MYLINGUAL.updateStatus = function () {} // display completed message
__MYLINGUAL.debugAlert = function (msg) { /* display debug message */ }
- var lang = navigator.language;
- var m = location.hash.match(/[#&]lang=(\w+)/);
- if (m) lang = m[1];
+ var lang;