This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-CredentialForWeb() | |
{ | |
$cred = $null | |
$cred = Get-Credential | |
if ($cred -ne $null) { | |
return New-Object System.Management.Automation.PSCredential($cred.UserName.Substring(1), $cred.Password) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq.Expressions; | |
using System.Net; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Web; | |
namespace TumblrBulkUploader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import clr | |
from System.Net import WebClient | |
from Misuzilla.Applications.TwitterIrcGateway import Status, Statuses, User, Users, Utility | |
from Misuzilla.Applications.TwitterIrcGateway.AddIns import IConfiguration | |
from Misuzilla.Applications.TwitterIrcGateway.AddIns.Console import ConsoleAddIn, Console, Context | |
from Misuzilla.Applications.TwitterIrcGateway.AddIns.DLRIntegration import DLRIntegrationAddIn, DLRBasicConfiguration, DLRContextHelper | |
# タイムラインをクライアントに送信する直前のイベントハンドラ | |
def OnPreSendMessageTimelineStatus(sender, e): | |
webClient = WebClient() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- ログ行数 --> | |
<entry key="window.loglines">5</entry> | |
<!-- フォント --> | |
<entry key="window.font.family">Tahoma</entry> | |
<!--entry key="window.font.size">9</entry--> | |
<!-- 表示位置 --> | |
<entry key="window.top">0</entry><!-- 880 --> | |
<entry key="window.left">600</entry> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import clr | |
from Misuzilla.Applications.TwitterIrcGateway import Status, Statuses, User, Users, Utility | |
from Misuzilla.Applications.TwitterIrcGateway.AddIns import IConfiguration | |
from Misuzilla.Applications.TwitterIrcGateway.AddIns.Console import ConsoleAddIn, Console, Context | |
from Misuzilla.Applications.TwitterIrcGateway.AddIns.DLRIntegration import DLRIntegrationAddIn, DLRBasicConfiguration, DLRContextHelper | |
def OnPreSendUpdateStatus(sender, e): | |
e.Text = e.Text + " (footer text)" | |
# 後片付け |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import clr | |
import re | |
import Misuzilla.Applications.TwitterIrcGateway | |
import Misuzilla.Applications.TwitterIrcGateway.AddIns | |
import Misuzilla.Applications.TwitterIrcGateway.AddIns.Console | |
from System import * | |
from System.Threading import Thread, ThreadStart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import clr | |
from System import * | |
from System.Collections.Generic import * | |
from System.Diagnostics import Trace | |
import Misuzilla.Applications.TwitterIrcGateway | |
import Misuzilla.Applications.TwitterIrcGateway.AddIns | |
import Misuzilla.Applications.TwitterIrcGateway.AddIns.Console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import clr | |
from System.Diagnostics import * | |
pid_path = '/tmp/tig.pid' | |
f = open(pid_path, 'w') | |
f.write(Process.GetCurrentProcess().Id.ToString()) | |
f.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import clr | |
import System | |
from System.Diagnostics import Trace | |
import Misuzilla.Applications.TwitterIrcGateway | |
import Misuzilla.Applications.TwitterIrcGateway.AddIns | |
import Misuzilla.Applications.TwitterIrcGateway.AddIns.Console | |
from Misuzilla.Applications.TwitterIrcGateway.AddIns.Console import Context | |
from Misuzilla.Applications.TwitterIrcGateway.AddIns.DLRIntegration import DLRContext, DLRIntegrationAddIn, DLRContextHelper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Based on http://d.hatena.ne.jp/kenkitii/20060429/p1 | |
import re | |
import datetime, time | |
# IronPython | |
import clr | |
from System import * | |
from System.Text import * |