Skip to content

Instantly share code, notes, and snippets.

@raydive
raydive / headhunter.txt
Created September 28, 2018 12:36
From head hunter
お世話になっております。
Futuretech Japanのマークと申します。
私どもは、国内のインターネットビジネス業界に特化したヘッドハンティング会社でございます。
人材サーチを行う中で、度々アラタ様のお名前を伺う機会があり、是非一度お話をさせていただきたく、ご連絡させていただいております。
現職には、ご満足されていらっしゃることと存じますが、
現在、転職市場では多くの経験を必要とする職種のニーズが高まっております。
私どもの特徴としては、現時点ご紹介できる案件の紹介だけでなく、事前にキャリアプランなどを伺い、
@raydive
raydive / memo.md
Created October 6, 2017 11:38
【京都開催 feat.はてな】Cookpad Tech Kitchen #11メモ

【京都開催 feat.はてな】Cookpad Tech Kitchen #11 - connpass

イカリング2におけるシングルページアプリケーション

  • フロントエンドはSPA(Typescriptとreact)
  • サーバー側はperlとdocker
  • サービスの特性でSPA
  • 工数はかさみがちの印象
  • SPAはGUIアプリ

ScalaとPerlでMicroservices in production

@raydive
raydive / delete_row.rb
Created May 22, 2017 13:53
特定のIDを持つCSVファイルの行を削除する簡単なrubyスクリプト
require 'csv'
OUTPUT_FILE = 'output.csv'
src_file, dist_file, _ = ARGV
deleted_data = CSV.read(src_file).flatten[2..-1]
CSV.open(OUTPUT_FILE, 'w') do |file|
CSV.foreach(dist_file) do |row|
@raydive
raydive / play.cr
Last active March 26, 2016 17:30
Crystal langでPhantom Typeっぽくやりたかったけど、なんか違う
module A
class State
end
class Ready < State
end
class NotReady < State
end
end
@raydive
raydive / yorufukurou_tabinfo.rb
Created October 13, 2015 17:13
夜フクロウのタブ情報をさくっと出力できるようにした
# encoding: utf-8
require "nokogiri"
doc = File.open("com.YoruFukurouProject.YoruFukurou.plist") {|f| Nokogiri::XML(f) }
File.open("info.txt", mode = "w") do |f|
doc.xpath("//dict[key='SearchTab']").each do |dict|
title = dict.xpath("key[.='TitleName']/following-sibling::string").text
names = dict.xpath("array/string").map { |e| e.text }.join(',')
@raydive
raydive / rename_and_add_tag.rb
Created July 8, 2015 14:39
mp4tagsを使って、m4aファイルにタグ付け
# -*- coding: utf-8 -*-
require 'fileutils'
total = Dir::glob(ARGV[0]+"*.m4a").count
ALBUM = "TVアニメ『響け!ユーフォニアム』オリジナルサウンドトラック おもいでミュージック"
Dir::glob(ARGV[0]+"*.m4a").each.with_index(1) do |entry, i|
p entry
new_name = entry.gsub(/(\d+\_)/, '')
FileUtils.mv(entry, new_name)
# coding: utf-8
# タクシー数の4乗バージョン ruby
test = []
(1..300).each {|i| (1..300).each {|j| test << [i, j].sort }}
test.uniq!
by = test.group_by {|i,j| i**4 + j**4 }.select {|key, value| value.count > 1 }
p by # => {3262811042=>[[7, 239], [157, 227]], 635318657=>[[59, 158], [133, 134]], 8657437697=>[[193, 292], [256, 257]]}

Goのお話(仮)

Goとはなにか

  • Google発のプログラミング言語
    • 2009年発表
    • Ken Thonmpson、Rob Pikeなど
  • 特徴
    • シンプルな言語仕様
    • 開発環境の充実
  • 豊富な標準パッケージ
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000000
SAVEHIST=1000000
setopt appendhistory autocd extendedglob notify auto_pushd correct magic_equal_subst prompt_subst
unsetopt beep
bindkey -e
# completion
zstyle :compinstall filename './zshrc'
@raydive
raydive / file0.txt
Last active August 7, 2020 03:37
いつもいつも忘れてしまうのでruby-buildのconfigureオプションの設定についてメモっておく ref: https://qiita.com/raydive/items/e07611a6a30b985c9698
$ CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline` --with-openssl-dir=`brew --prefix openssl`" RUBY_CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline` --with-openssl-dir=`brew --prefix openssl`" rbenv install rbx-2.2.6
Downloading rubinius-2.2.6.tar.bz2...
-> http://releases.rubini.us/rubinius-2.2.6.tar.bz2
Installing rubinius-2.2.6...
BUILD FAILED
Inspect or clean up the working tree at /var/folders/_7/12w0r1850z9c0lp6sxr9x6ww0000gn/T/ruby-build.20140511110113.7856
Results logged to /var/folders/_7/12w0r1850z9c0lp6sxr9x6ww0000gn/T/ruby-build.20140511110113.7856.log