Skip to content

Instantly share code, notes, and snippets.

@myaumyau
myaumyau / tmpl.cmd
Last active December 13, 2015 21:08
[MS-DOS]バッチテンプレ MSDOS
rem MS-DOS
@echo off
setlocal
rem ======================================================================
rem カレントドライブ・カレントディレクトリをバッチファイルのディレクトリにする
cd /d %~dp0
rem ======================================================================
rem iniファイル(***.cmdの場合は***.ini)
@myaumyau
myaumyau / RSS-FeedsMemo.md
Last active December 13, 2015 21:08
[md]RSS Feeds Memo Facebook, ...

RSS Feeds Memo

Facebook

http://www.facebook.com/<id>
http://graph.facebook.com/<id>
https://www.facebook.com/feeds/page.php?format=rss20&id=<id>
https://www.facebook.com/feeds/page.php?format=atom10&id=<id>
@myaumyau
myaumyau / ConfigOverrideTest.cs
Created February 18, 2013 04:04
[C#]ConfigurationManager.AppSettingsの値を書き換え
/*
* ConfigurationManager.AppSettingsの値を書き換え
* http://stackoverflow.com/questions/158783/is-there-a-way-to-override-configurationmanager-appsettings
*/
using System;
using System.Collections.Specialized;
using System.Configuration;
using System.Configuration.Internal;
using System.Reflection;
@myaumyau
myaumyau / Stopwatch.js
Created February 18, 2013 04:03
[js]Stopwatch
var Stopwatch = function() {
this.initialize.apply(this, arguments);
};
Stopwatch.prototype = {
initialize: function() {
this.reset();
},
start: function() {
this.startTime = new Date();
},
@myaumyau
myaumyau / Calendar.js
Created February 18, 2013 04:02
[js]自前カレンダー
Calendar = function() {
this.initialize.apply(this, arguments);
}
Calendar.config = {
tags: {
header: "table",
headerChild: "tr",
thisMonth: "td",
prev: "td",
next: "td",
@myaumyau
myaumyau / PermutationAndCombination.js
Created February 18, 2013 04:01
[js]Combinations And Permutations(組合せと順列)
// http://d.hatena.ne.jp/zecl/20090127/p1
/** 組み合わせ */
var Combinations = (function() {
var _public,
_items = null,
_length = 0,
_indices = null,
_combinations = null,
_finalIndices = null,
@myaumyau
myaumyau / Construct.cs
Created February 18, 2013 03:57
[C#]引数付きコンストラクタのインスタンスをgenericで生成
public static T Construct<T, A>(A arg)
{
Type type = typeof(T);
ConstructorInfo ctor = type.GetConstructor(new Type[] { typeof(A) });
if (ctor == null)
throw new NotSupportedException("コンストラクタが定義されていません。");
return (T)ctor.Invoke(new object[] { arg });
}
@myaumyau
myaumyau / NumRefToString.js
Created February 18, 2013 03:55
[js]数値文字参照(16進数, 10進数)を文字列に変換
function hexNumRefToString(hexNumRef) {
return hexNumRef.replace(/&#x([0-9a-f]+);/ig, function(match, $1, idx, all) {
return String.fromCharCode('0x' + $1);
});
}
function decNumRefToString(decNumRef) {
return decNumRef.replace(/&#(\d+);/ig, function(match, $1, idx, all) {
return String.fromCharCode($1);
});
}
@myaumyau
myaumyau / CreateFolder.vbs
Created February 18, 2013 03:52
[vbs]指定されたパスのフォルダを再帰作成
Option Explicit
If WScript.Arguments.Count = 3 Then
Call CreateFolder(WScript.Arguments.Item(0))
End If
Sub CreateFolder(strPath)
Dim objFso
Dim strParentPath
Set objFso = CreateObject("Scripting.FileSystemObject")