Skip to content

Instantly share code, notes, and snippets.

View boxp's full-sized avatar
👩‍💻
in reality

Keitaro Takeuchi boxp

👩‍💻
in reality
View GitHub Profile
@boxp
boxp / little-region.clj
Created May 17, 2014 20:01
Grimoireでリプ爆する為の設定
; リプ爆用関数
(defn little-region
"槍を持つたくさんの人形達が,標的に向かって突進して行く
(複数のアカウントから特定のツイート・ユーザーに対して
同じリプライを送る)
例1:(little-region @twitters 'marisa' 'hello')
全てのアカウントから@marisaに向けてhelloと呟く
例2:(little-region (-> @twitters (dissoc :syanhai1))
--ちんちんっぽいことするやつ
import System.Random
chimpo :: String -> String
randomString :: String -> String
chimpo c = if take 4 c == "ABCDE"
then c ++ ("なんか終わりました" ++ (show (length c )))
else chimpo (randomString c)
randomString s = getStdRandom(randomR(0,4)) >>= \r -> case r of
@boxp
boxp / yodobashi.clj
Created November 20, 2013 14:48
ヨォドォバァシィカメェラァするヨォドォバァシィカメェラァ
(reify Plugin
(get-name [this] nil)
(on-status [this status] nil)
(on-rt [this status] nil)
(on-unrt [this status] nil)
(on-fav [this source target status] nil)
(on-unfav [this source target status] nil)
(on-del [this status] nil)
(on-follow [this source user] nil)
(on-dm [this dm] nil)
@boxp
boxp / growl.clj
Created November 11, 2013 00:11
GrimoireでGrowlに通知を送るプラグイン
(do
(require '[gntp :as gp]
'[clojure.java.io :as io])
(let [growler (gp/make-growler "Grimoire")
notifier (if (try (.. @main-stage isShowing)
(catch Exception e nil))
(fn [& _] nil)
(growler :default {:icon (io/input-stream (io/resource "alice.png"))}))]
(reify Plugin
(get-name [this] nil)
@boxp
boxp / ldesu.clj
Created November 6, 2013 07:13
ですで〜す^^
(reify Plugin
(get-name [this] "美容室で〜す^^")
(on-status [this status] nil)
(on-rt [this status] nil)
(on-unrt [this status] nil)
(on-fav [this source target status] nil)
(on-unfav [this source target status] nil)
(on-del [this status] nil)
(on-follow [this source user] nil)
(on-dm [this dm] nil)
@boxp
boxp / plugin_temp.clj
Created November 4, 2013 18:23
Grimoireのプラグイン一例です.~/.grimoire/plugin/にこのコードを保存したファイルを配置する事で,ツイートをコピー出来るようになります.
(do
; 名前空間の束縛はdo内で行なって下さい
(import '(javafx.scene.input Clipboard ClipboardContent))
; プラグインを作成
; それぞれnilの部分を書き換えて,プラグインの処理を書いて下さい.
(reify Plugin
; 右クリックメニューの名前を返します
(get-name [this] "クリップボードへコピー")
; ツイート(status)を受信した際に呼ばれる
(on-status [this status] nil)
@boxp
boxp / abc2-3.cljs
Created October 28, 2013 12:35
ABC#2 3問目
(ns atcoder.core
(:use [clojure.string :only (join split split-lines)]))
; don't fix me
(defn gen-args
[input]
(split-lines input))
; start code section
@boxp
boxp / abc2-2.cljs
Created October 28, 2013 12:25
ABC#2 2問目
(ns atcoder.core
(:use [clojure.string :only (join split split-lines)]))
; don't fix me
(defn gen-args
[input]
(split-lines input))
; start code section
@boxp
boxp / abc2-1.cljs
Created October 28, 2013 12:10
ABC#2 1問目
(ns atcoder.core
(:use [clojure.string :only (join split split-lines)]))
; don't fix me
(defn gen-args
[input]
(split-lines input))
; start code section
; Grimoire settings
; Created by BOXP<http://archbox.dip.jp/>
; theme settings
; solarized_dark
(reset! theme "solarized_dark")
; set tweet text size
(reset! tweets-size 13)
; service settings