Skip to content

Instantly share code, notes, and snippets.

View gouf's full-sized avatar
😇
I don't know how my life work with.

Go Furuya gouf

😇
I don't know how my life work with.
View GitHub Profile
@okohs
okohs / whitelist.md
Last active September 7, 2019 22:57
20180122_定時前に帰宅できた企業

はじめに

書き方

該当する各社の対応欄に企業名を書いてください。備考があれば適宜カッコ書きしてください。

目的

  • 定時前に帰宅させてくれるホワイトな会社のりすとを気軽に作りたい
  • 定時前に帰宅させてくれるホワイトな会社がホワイトアピールできる場があれば良いな

@YungSang
YungSang / README.md
Last active August 29, 2015 14:05
Panamax without Installer

Panamax without Installer

for VirtualBox

$ vagrant up
$ open http://localhost:8888

for Parallels Desktop 9

@matsubo
matsubo / credit_card_bin_codes.md
Last active March 8, 2024 04:14
Credit Card Bin Codes

概要

クレジットカード番号には法則があり、先頭6桁でカードの種類を識別、分類することができる。

詳細はISO/IEC 7812で規定されている。

ISO/IEC 7812 - Wikipedia https://ja.wikipedia.org/wiki/ISO/IEC_7812

先頭の6桁を銀行識別番号(Bank Identification Number、略称:BIN)ないしは発行者識別番号(Issuer Identification Number、略称:IIN)と呼び、この先頭6桁でカード発行会社(イシュア、issuer)が判るようになっている。

@wonderful-panda
wonderful-panda / paizahack_lite.md
Last active August 29, 2015 14:04
paiza オンラインハッカソン lite(https://paiza.jp/poh/kirishima) pythonによるコード #paizahack_lite

paizaオンラインハッカソン lite をPythonで解いてみた.

結果 は0.01秒.

単純に枝刈りしながら深さ優先探索するだけのコードだけど, あらかじめ単価の安い順にソートしておくのと, Solver.least_cost() あたりの処理とで出来るかぎり浅いところで枝刈りされるようにしている.

とはいえ、このコードで TestCase7が0.01秒というのはちょっと速すぎる気がしないでもない.

# -*- coding:utf-8 -*-
@kobaatsu
kobaatsu / pref.csv
Last active August 5, 2022 07:22
都道府県一覧 #utils
北海道 HOKKAIDO hokkaido
青森県 AOMORI aomori
岩手県 IWATE iwate
宮城県 MIYAGI miyagi
秋田県 AKITA akita
山形県 YAMAGATA yamagata
福島県 FUKUSHIMA fukushima
茨城県 IBARAKI ibaraki
栃木県 TOCHIGI tochigi
群馬県 GUNMA gunma
@mochizuki-masao
mochizuki-masao / count.rb
Last active September 8, 2016 17:50
S3_count_storage_size
#!/usr/bin/env ruby
require 'aws-sdk'
require 'optparse'
begin
require 'aws/profile_parser'
rescue LoadError; end
def conv_unit size
@gouf
gouf / random_name.rb
Last active July 13, 2016 14:28
ちょっと人にやさしいランダムな命名
require 'randexp'
require 'faker'
require 'forgery'
I18n.enforce_available_locales = true
I18n.default_locale = :en
class Randgen
def self.rand_name(options = {})
/#{Forgery::Basic.color}-#{Faker::Name.first_name}-\d{4}/.gen.downcase
@hiroshiro
hiroshiro / use_return.rb
Created February 28, 2014 19:00
制御構文の条件式ネストを避けるガード節のRubyの構文。良い、悪い例。
# bad
def compute_thing(thing)
if thing[:foo]
update_with_bar(thing)
if thing[:foo][:bar]
partial_compute(thing)
else
re_compute(thing)
end
end
@jaimalchohan
jaimalchohan / github.rb
Last active January 1, 2016 04:19 — forked from plusjade/github.rb
Updated for breaking changes in ruhoh 2.6
require 'tmpdir'
# Usage:
# add to ruhoh-site/plugins/publish/github.rb
# - Your GitHub remote must be setup properly but The command will try to walk you through it.
# - You must have a clean working directory to publish to GitHub pages since the hook is actually triggered by commits.
#
# $ cd ruhoh-site
# $ bundle exec ruhoh publish github
class Ruhoh
@hyamamoto
hyamamoto / vimdiff.md
Created December 4, 2013 08:16
The vimdiff cheat sheet as a git mergetool.

vimdiff cheat sheet

This is a vimdiff cheat sheet as a git mergetool.

Commands

]c - go to next difference