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 / 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 / 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 / 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)
--ちんちんっぽいことするやつ
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 / 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))
@boxp
boxp / cons_cell.c
Created May 19, 2014 14:18
C言語でコンスセルとその他諸々
#include<stdio.h>
#include<stdlib.h>
typedef struct cell {
int car;
struct cell *cdr;
} _cell;
struct cell *cons(int car, struct cell *cdr) {
@boxp
boxp / queue.c
Created June 2, 2014 01:14
C言語でキュー
#include <stdio.h>
#define QUEUESIZE 3000
struct Queue {
int buffer[QUEUESIZE];
int length;
};
int enqueue(struct Queue *queue, int data) {
@boxp
boxp / stack.c
Created June 2, 2014 01:23
C言語でスタック
#include <stdio.h>
#define STACKSIZE 3000
struct Stack {
int buffer[STACKSIZE];
int length;
};
int push(struct Stack *stack, int data) {
@boxp
boxp / bulletML_test.js
Created June 23, 2014 08:13
動かないゴミコード
enchant();
/* global vars */
const WIDTH = 320;
const HEIGHT = 480;
/* initial function */
window.onload = function () {
var game = new Game(WIDTH, HEIGHT);
@boxp
boxp / yo.clj
Last active August 29, 2015 14:03
Yo for Grimoire
(do
(import '(javafx.scene.media AudioClip))
(let [yo (AudioClip. "http://archbox.dip.jp/res/Yo.mp3")]
(reify Plugin
(get-name [this] "Yo")
(on-status [this status]
(if (re-find #"yo|Yo|YO" (. status getText))
(. yo play)))
(on-reply [this status] nil)