This file contains hidden or 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
# TypableMap: 公式RT | |
Misuzilla::IronRuby::TypableMap.register("rt", "ReTweet Command") do |p, msg, status, args| | |
System::Diagnostics::Trace.WriteLine("RT: #{status.to_string}") | |
Session.RunCheck(Misuzilla::Applications::TwitterIrcGateway::Procedure.new{ | |
Session.twitter_service.POST("/statuses/retweet/#{status.id}.xml", System::Array[System::Byte].new(0)) | |
Session.send_channel_message("RT: #{status.text}") | |
}, System::Action[System::Exception].new{|ex| | |
Session.send_channel_message(msg.receiver, Server.server_nick, "メッセージ送信に失敗しました", false, false, true) | |
}) | |
true # true を返すとハンドルしたことになりステータス更新処理は行われない |
This file contains hidden or 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
module Bar where | |
myReverse [] = [] | |
myReverse (x:xs) = myReverse xs ++ [x] |
This file contains hidden or 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
class Nil {} | |
class Cons(X, XS) {} | |
template length(T) { | |
static if (is(T == Nil)) { | |
const length = 0; | |
} else static if (is(T _ == Cons!(X, XS), X, XS)) { | |
const length = 1 + length!(XS); | |
} | |
} |
This file contains hidden or 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
{-# LANGUAGE ScopedTypeVariables #-} | |
{-- | |
Copyright (c) 2009, eagletmt | |
Released under the MIT License <http://opensource.org/licenses/mit-license.php> | |
--} | |
-- | This program checks if newly followed or removed. | |
-- Please install the following libraries on ahead: | |
-- json <http://hackage.haskell.org/package/json> | |
-- base64-string <http://hackage.haskell.org/package/base64-string> |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <mach-o/loader.h> | |
#include <mach-o/nlist.h> | |
#include <assert.h> | |
void *find_function(char *obj, const char *name); | |
int main(void) |
This file contains hidden or 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
{-# LANGUAGE ScopedTypeVariables #-} | |
module Main where | |
import Network.HTTP | |
import Text.JSON | |
import System.IO.UTF8 as U | |
data Feed = Feed (JSObject JSValue) | |
stringFromObj :: String -> JSObject JSValue -> String | |
stringFromObj s obj = let Ok (v::JSString) = valFromObj s obj in fromJSString v |
NewerOlder