This file contains 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 :nice_rock do | |
on_appear do |ms| | |
ms.each do |m| | |
if m.message.to_s =~ /ロックスター/ | |
str ="@#{m.user.idname}" + " ナイスロック" | |
Service.primary.post(:message => str, :replyto => m) | |
end | |
end | |
end |
This file contains 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(:fackin_hot) do | |
on_appear do |ms| | |
ms.each do |m| | |
if m.message.to_s =~ /^暑い/ | |
str = "@#{m.user.idname}" + " ファッキンホット" | |
Service.primary.post(:message => str, :replyto => m) | |
end | |
end |
This file contains 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 | |
require "rubygems" | |
require "nokogiri" | |
require "open-uri" | |
require "kconv" | |
require "time" | |
def tenki | |
time = Time.new | |
doc = Nokogiri::HTML(open("http://tenki.jp/forecast/point-702.html")) |
This file contains 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 | |
require 'rubygems' | |
require 'twitter' | |
CONSUMER_KEY = 'APIキー' | |
CONSUMER_SECRET = 'APIシークレットキー' | |
ACCESS_TOKEN = 'アクセストークン' | |
ACCESS_TOKEN_SECRET = 'アクセストークンシークレット' | |
client = Twitter::REST::Client.new do |config| |
This file contains 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 | |
fizz = -> (n) { n % 3 == 0 } | |
buzz = -> (n) { n % 5 == 0 } | |
fizzbuzz = -> (n) { fizz.call(n) and buzz.call(n) } | |
(1..30).each do |v| | |
case v | |
when fizzbuzz | |
puts "fizzbuzz" |
This file contains 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
// ==UserScript== | |
// @name selector_fi | |
// @namespace https://twitter.com/akameco | |
// @include http://www.cue.im.dendai.ac.jp/* | |
// @include https://www.mlab.im.dendai.ac.jp/* | |
// @include http://www.mlab.im.dendai.ac.jp/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
(function () { |
This file contains 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
@font-face { | |
font-family: "MS Pゴシック"; | |
src: local(""); | |
} | |
@font-face { | |
font-family: "MS PGothic"; | |
src: local(""); | |
} |
This file contains 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
" ツリー型タブの自動開閉 {{{ | |
js <<EOM | |
var timer=false; | |
window.addEventListener('resize',function () { | |
if(timer !== false) { | |
clearTimeout(timer); | |
} | |
timer = setTimeout(function() { | |
if(window.outerWidth < 700) { | |
if(TreeStyleTabService.isAutoHide == 0) |
This file contains 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
import javazoom.jlgui.basicplayer.BasicPlayer; | |
import javazoom.jlgui.basicplayer.BasicPlayerException; | |
import javax.swing.*; | |
import java.awt.*; | |
import java.awt.event.ActionEvent; | |
import java.io.File; | |
public class SamplePlayer extends JPanel { | |
BasicPlayer player; |
This file contains 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
package compilir; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.*; | |
public class Calculator { | |
// 変数の名前と値の組を格納する HashMap (値は整数限定) | |
private HashMap<String, Double> symbolMap; |
OlderNewer