Skip to content

Instantly share code, notes, and snippets.

View june29's full-sized avatar
🚿

june29 june29

🚿
View GitHub Profile
# -*- coding: utf-8 -*-
require "date"
class Date
(1..5).each { |n|
define_method("第#{n}?") { (self.day.to_f / 7.to_f).ceil == n }
}
%w(日 月 火 水 木 金 土).each_with_index { |曜日, index|
# -*- coding: utf-8 -*-
require "date"
class Date
(1..5).each { |n|
define_method("第#{n}?") { (self.day.to_f / 7.to_f).ceil == n }
}
%w(日 月 火 水 木 金 土).each_with_index { |曜日, index|
@june29
june29 / gems-rails.json
Created April 27, 2014 13:04
RubyGems.org api response examples
{
"name": "rails",
"downloads": 34516789,
"version": "4.1.0",
"version_downloads": 116577,
"platform": "ruby",
"authors": "David Heinemeier Hansson",
"info": "Ruby on Rails is a full-stack web framework (略)",
"licenses": [ "MIT" ],
"project_uri": "http://rubygems.org/gems/rails",
// ==UserScript==
// @name Maximize LDR view
// @namespace http://june29.jp/
// @include http://reader.livedoor.com/reader/
// ==/UserScript==
(function(){
GM_addStyle('#header, #control, #menu, #footer { display: none !important; }');
GM_addStyle('#subs_toolbar, #subs_buttons, #subs_search { display: none !important; }');
GM_addStyle('#ads_bottom { display: none !important; }');
Gem::Specification.new do |spec|
spec.name = "ruboty-omikuji"
spec.version = "0.0.2"
spec.authors = ["Jun OHWADA"]
spec.email = ["june29.jp@gmail.com"]
spec.summary = "Omikuji"
spec.files = ["ruboty-omikuji.rb"]
spec.require_path = "."
end
Gem::Specification.new do |spec|
spec.name = "ruboty-totsuzenno"
spec.version = "0.0.2"
spec.authors = ["Jun OHWADA"]
spec.email = ["june29.jp@gmail.com"]
spec.summary = "Totsuzen no Shi"
spec.files = ["ruboty-totsuzenno.rb"]
spec.require_path = "."
end
Gem::Specification.new do |spec|
spec.name = "ruboty-pull-requests"
spec.version = "0.0.1"
spec.authors = ["Jun OHWADA"]
spec.email = ["june29.jp@gmail.com"]
spec.summary = "Access to pull requests"
spec.files = ["ruboty-pull-requests.rb"]
spec.require_path = "."
spec.add_dependency "octokit"
end
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss"/>
<link rel="shortcut icon" href="{Favicon}">
<link type="text/css" rel="stylesheet" media="screen" href="http://june29.jp/stylesheets/screen.css"/>
<title>{Title}</title>
<style type="text/css">
@june29
june29 / ruboty-clock.rb
Last active August 29, 2015 14:25
ruboty-clock.rb
require "time"
module Ruboty
module Handlers
class Clock < Base
on(
/clock\z/i,
name: "clock",
description: "Say current time"
)
Gem::Specification.new do |spec|
spec.name = "ruboty-drone"
spec.version = "0.0.1"
spec.authors = ["Jun OHWADA"]
spec.email = ["june29.jp@gmail.com"]
spec.summary = "Access to Drone.io"
spec.files = ["ruboty-drone.rb"]
spec.require_path = "."
spec.add_dependency "drone-ruby"
end