Skip to content

Instantly share code, notes, and snippets.

Kensuke Nagae kyanny

Block or report user

Report or block kyanny

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kyanny
kyanny / Rakefile
Created Jul 29, 2015
Qiita::Team お引越しスクリプト
View Rakefile
require 'json'
require 'yaml'
require 'nokogiri'
require 'uri'
require 'faraday'
require 'ostruct'
require 'pry'
def y data
puts YAML.dump data
@kyanny
kyanny / fib.exs
Created Mar 13, 2012
Elixir fibonacci #1
View fib.exs
defmodule Fib do
def fib(0) do 0 end
def fib(1) do 1 end
def fib(n) do fib(n-1) + fib(n-2) end
end
IO.puts Fib.fib(10)
View main.workflow
workflow "Post labeled issue to Slack" {
resolves = ["GitHub Action for Slack"]
on = "issues"
}
action "Filters for GitHub Actions-1" {
uses = "actions/bin/filter@0dbb077f64d0ec1068a644d25c71b1db66148a24"
args = "action labeled"
}
View delete_all_statuses.rb
#!/usr/bin/env ruby
require 'net/http'
require 'openssl'
require 'uri'
require 'json'
begin
http = Net::HTTP.new(ENV.fetch('MASTODON_HOST'), 443)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
@kyanny
kyanny / gist:5694201
Last active May 17, 2019
日本語概略:: RubyKaigi 2013 – great conference, but I probably wouldn’t go next year if I was a woman
View gist:5694201

RubyKaigi 2013 – great conference, but I probably wouldn’t go next year if I was a woman の内容の概略です。認識間違ってたら訂正するので @kyanny までご連絡ください。

It is a Japanese outline text of RubyKaigi 2013 – great conference, but I probably wouldn’t go next year if I was a woman. If you find any issues, please mention to @kyanny.


  • RubyKaigi 2013 のあるプレゼン中に、発表者が「おまえらが来年台湾に来るべき理由: 女の子がかわいい」という発言をした (あくまで冗談、というニュアンスで)
  • その発言に対する聴衆の反応は、拍手喝采・オオウケ、という感じだった。けどこれってまずくない?というのが元ブログの趣旨
  • ブログの著者は、この発表者の発言そのものを問題視しているのではない (全く問題が無いと思っているわけでもないが、個人攻撃は望んでいないのであえて名指ししていない / 訳者も同感です)
  • 聴衆はざっと見た感じ 95% くらいは男性で、ブログ著者は、「そういう男性ばかりの場で、女性の容姿に関する冗談に対し、そのような反応をしているのをその場に居合わせた女性が見たら、来年もまた来たいと思うのだろうか?」と言っている
View table.rb
#!/usr/bin/env ruby
# Usage
# $ ruby tools/table.rb
require 'terminal-table'
def make_table rank
headings = [ rank.upcase ]
qs = eval(File.read("tools/#{rank}.txt")).to_a
rows = qs.map { |q|
[q]
View paiza.js
copy(
$$('.problem-group .problem-box__header__title').map(function(el){ return el.textContent.split(/:/)[0] })
)
View bfs.rb
require 'thread'
V = Struct.new(:x, :y, :visited, :goal)
m = []
$w = 10
$h = 10
$h.times do |h|
l = []
View a.el
(let* ((elapsed
(float-time
(time-subtract
(date-to-time "2019-01-17 18:05")
(date-to-time "2019-01-17 13:19"))))
(in_minutes (/ elapsed 60))
(in_hours (/ in_minutes 60))
(remained_minutes (mod in_minutes 60)))
(format "%d hours %d minutes" in_hours remained_minutes))
View gist:5ed1a23b72e6c5dd1e455685d958cf5c
var current = null;
var originalStyle = '';
document.onmouseover = function(e) {
current = document.elementFromPoint(e.clientX, e.clientY);
originalStyle = current.style;
current.style = 'background: rgba(255, 0, 0, 0.2)';
if (window.speechSynthesis) {
var synth = speechSynthesis;
var message = current.textContent;
You can’t perform that action at this time.