- 長い
- 長いのに改行がない
- URLを含まない
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
| # -*- coding: utf-8 -*- | |
| Plugin.create(:tl_wave) do | |
| words = ['ゆ', 'yu', 'ゆれ', 'yure', 'yureda', '#筑波大学は核実験をやめろ'] | |
| expire = Time.now | |
| short_tweets = [] | |
| words_matched_tweets = [] | |
| on_update do |service, messages| |
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
| .data | |
| s: .string "%d^2 = %d^2+%d^2\n" | |
| ers: .string "ERROR\neax=0x%x, ebx=0x%x, ecx=0x%x, edx=0x%x\n" | |
| .text | |
| .globl main | |
| main: | |
| init: | |
| push %ebp | |
| mov %esp, %ebp |
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
| scripts_ans = [ | |
| ['( + 3 8 )', 11], | |
| ['( + 5 ( * 3 7 ) )', 26], | |
| ['3', 3], | |
| ['abc', 'abc'], | |
| ['( call ( fun square ( call square 3 ) ) ( fun x ( * x x ) ) )', 9], | |
| ['( call ( call ( fun x ( fun y ( / ( + x y ) 2 ) ) ) 5 ) 9 )', 7], | |
| ['( == ( + 1 1 ) 2 )', '( fun left ( fun right left ) )'], | |
| ['( == ( + 1 1 ) 0 )', '( fun left ( fun right right ) )'], | |
| ['( call ( call ( == 1 1 ) ( * 3 3 ) ) ( * 5 5 ) )', 9], |
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
| Plugin.create :NopuA do | |
| #regex = /(ぷ|ふ゜)[\s\n]*[えぇゑ][\s\n]*([ー〜―−]|\s[\||])/ | |
| regex = /(ぷ|ふ゜)[^[:word:]]*[えぇゑ]/ | |
| on_appear do |ms| | |
| ms.each do |m| | |
| body = m.body | |
| unless m.retweet? || /[言い]うな/ =~ body | |
| if regex =~ body | |
| if m[:created] > Time.now - 5 #5秒以前のツイートにはリプライしない | |
| m.post( message: "@#{ m.user.idname } #{$&}言うな!! (自動ツイート)" ) |
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
| # -*- coding: utf-8 -*- | |
| module FuckinMaker | |
| def column(target = '') | |
| hbox = Gtk::HBox.new( true, 0 ) | |
| hbox.pack_start(Gtk::Label.new(target), false, false, 0 ) | |
| entry = Gtk::Entry.new | |
| entry.text = target | |
| hbox.pack_start(entry, false, false, 0) | |
| return [hbox, entry] |
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
| # -*- coding: utf-8 -*- | |
| Plugin.create(:tl_speed) do | |
| home_tl = Plugin[:gtk].widgetof(timeline(:home_timeline)) | |
| count = 0 | |
| on_update do |service, messages| | |
| home_tl ||= Plugin.create(:gtk).widgetof(timeline(:home_timeline)) | |
| time = Time.now | |
| count = 0 | |
| (home_tl || []).each_with_index do |message,i| |
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 String | |
| def sentouryoku | |
| return self.each_byte.to_a.inject(0) { |sum,i| sum*256 + i } | |
| end | |
| def *(otr) | |
| return self.sentouryoku * otr.to_s.sentouryoku | |
| end | |
| end |
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
| fp = fopen(argv[1], "r"); | |
| if(! fp) | |
| { | |
| printf("can't open %s\n", argv[1]); | |
| return 1; | |
| } | |
| i = 0; | |
| mode = 0; /* 0=>name, 1=>point */ | |
| while ((ch = fgetc(fp)) != EOF) { |
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
| Plugin.create :fav2u do | |
| count = 0 | |
| onappear do |ms| | |
| ms.each do |m| | |
| user = m.user | |
| if m.user.to_s == 'toshi_a' | |
| m.message.favorite(true) | |
| count += 1 | |
| puts 'ふぁぼった ' + count.to_s | |
| end |