Skip to content

Instantly share code, notes, and snippets.

@tumugin
tumugin / misakura.rb
Created May 20, 2014 15:54
みしゃくら語に変換しゅるのぉおおプラグインにゃのぉおおれしゅぅぅぅ
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(/ごきげんよう/,'ごきげんよぉおお!んおっ!んおおーーっ! ')
anonymous
anonymous / naniittenda_koitu.rb
Created October 16, 2014 14:26
Twitterには何言ってんだこいつボタンが必要
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
@penguin2716
penguin2716 / auto_retweet_previous_tweet.rb
Created December 23, 2014 18:09
「いまのなし」ってつぶやいた人の直前のツイートをRTするmikutterプラグイン
# -*- 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 == "いまのなし"
@srockstyle
srockstyle / chef_nginx_passenger
Last active August 29, 2015 14:14
ChefでnginxのビルドからPassengerのビルドまで質問に答えず一発で終わらせる方法
#!/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")
@drobune
drobune / jump-to-github.el
Created September 5, 2015 21:01
emacsでカーソル行のgithubページに飛ぶ
(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'")
@nna774
nna774 / gist:3361116
Created August 15, 2012 15:46
オセロ
-- オセロ
--import Data.Functor
import Maybe
import Control.Monad
data Color = Black | White deriving (Eq, Show, Read)
type Cell = Maybe Color
type Board = [[ Cell ]]
@myuon
myuon / gist:3386693
Created August 18, 2012 13:03
SKIコンビネータ2
\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))
@mzp
mzp / vvakame.md
Created November 16, 2012 07:11
わかめモナ化.md
@penguin2716
penguin2716 / aieeeee.rb
Created March 6, 2013 17:07
どんなツイートも「アイエエエエエ!」になっちゃうmikutterプラグイン
#-*- 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
@geta6
geta6 / catimg(bash)
Last active January 23, 2016 22:35
cat image on xterm256 terminal, zsh or bash
#!/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