- うかつにモナドと言うと刺される
「jQueryはモナドである」と主張したけど、証明はなかったのですぐに刺された。
def AheGaoDoublePeace(text) | |
str = text | |
str = str.gsub(/(気持|きも)ちいい/,'ぎも゛ぢい゛い゛ぃ') | |
str = str.gsub(/(大好|だいす)き/,'らいしゅきいぃっ') | |
str = str.gsub(/(ミルク|みるく|牛乳)/,'ちんぽミルク') | |
str = str.gsub(/お(願|ねが)い/,'お願いぃぃぃっっっ゙') | |
str = str.gsub(/ぁ/,'ぁぁ゛ぁ゛') | |
str = str.gsub(/あ/,'ぁあああ あぉ') | |
str = str.gsub(/お/,'お゙ぉおォおん') | |
str = str.gsub(/ごきげんよう/,'ごきげんよぉおお!んおっ!んおおーーっ! ') |
Plugin.create :naniittenda_koitu do | |
command(:naniittenda_koitu, | |
name: '何言ってんだこいつ', | |
condition: lambda{ |opt| opt.messages.size == 1 }, | |
visible: true, | |
role: :timeline) do |opt| | |
Service.primary.post message: "何言ってんだこいつ #{opt.messages.first.parma_link}" | |
end | |
end |
# -*- coding: utf-8 -*- | |
Plugin.create :auto_retweet_previous_tweet do | |
tweet_before = {} | |
on_appear do |ms| | |
ms.each do |m| | |
if tweet_before[m.user] | |
tweet_before[m.user].retweet if m.to_s == "いまのなし" |
#!/usr/bin/ruby #Gistでハイライトされないので | |
## nginxのビルドとpassnegerのインストール | |
execute 'build nginx' do | |
command "passenger-install-nginx-module" << | |
" --auto" << | |
" --prefix=/opt/nginx" << | |
" --nginx-source-dir=/usr/src/nginx-#{node['nginx']['version']}" << | |
" --extra-configure-flags='--with-ipv6 --with-http_realip_module --with-http_ssl_module --with-http_gzip_static_module --with-http_stub_status_module'" | |
not_if do | |
File.exists?("/opt/nginx/sbin/nginx") |
(defun jump-to-github () | |
"Go to github code position at most recent commitl;" | |
(interactive) | |
(let (full_path) | |
(setq | |
full_path buffer-file-name | |
dir_name (shell-command-to-string (concat "echo " full_path "| xargs dirname")) | |
cd_dir (shell-command-to-string (concat "cd " dir_name)) | |
prefix (shell-command-to-string "git rev-parse --show-prefix | tr -d '\n'") | |
current_commit (shell-command-to-string "git show -s --format=%H | tr -d '\n'") |
-- オセロ | |
--import Data.Functor | |
import Maybe | |
import Control.Monad | |
data Color = Black | White deriving (Eq, Show, Read) | |
type Cell = Maybe Color | |
type Board = [[ Cell ]] |
\abf.fab | |
= \abf.(I f)(K (ab)f) | |
= \ab.SI(K(ab)) | |
= \ab.(K(SI)(ab))(K(ab)) | |
= \ab.S(K(SI))K(ab) | |
= \ab.(K(S(K(SI))K) b)(a b) | |
= \ab.S(K(S(K(SI))K))ab | |
= S(K(S(K(SI))K)) | |
「jQueryはモナドである」と主張したけど、証明はなかったのですぐに刺された。
#-*- coding: utf-8 -*- | |
Plugin.create :aieeeee do | |
filter_gui_postbox_post do |gui_postbox| | |
Plugin.create(:gtk).widgetof(gui_postbox).widget_post.buffer.text = "アイエエエエエ!#{' ' * rand(30)}" | |
[gui_postbox] | |
end | |
end |
#!/bin/bash | |
# Modified by Yu-Jie Lin for Bash from zsh version | |
ORG="$1" | |
if [[ ${ORG##*.} =~ JPG|jpg|JPEG|jpeg|GIF|gif|PNG|png ]]; then | |
CATWIDTH=$(tput cols) | |
SRC=$(mktemp).png |