Skip to content

Instantly share code, notes, and snippets.

View belion-freee's full-sized avatar
:electron:
I'm still alive today

belion freee belion-freee

:electron:
I'm still alive today
  • freelance
  • Tokyo, JP
View GitHub Profile
@belion-freee
belion-freee / Dockerfile
Last active May 22, 2020 09:00
Simple Ruby Dockerfile
########### Exec commands ###########
# Docker for use in existing projects
# May you have to remove Gemfile.lock and db/schema.rb at first
#
# docker build . -t saml
# docker run -d -p 3000:3000 saml
#####################################
# cahnge for your version
FROM ruby:2.5.0
#!/bin/bash
set -e
tm=$(date +\%Y\%m\%d-\%H\%M)
dump_file=dump-${tm}.txt
dump_file_path=~/dump/$dump_file
db=db name
host=host ip
user=db user
@belion-freee
belion-freee / config.yml
Created March 9, 2020 03:11
sample circleci config.yml
version: 2.1
orbs:
# aws-ecr: circleci/aws-ecr@6.0.0
# aws-ecs: circleci/aws-ecs@1.1.0
heroku: circleci/heroku@1.0.1
jobs:
test:
docker:
@belion-freee
belion-freee / RspecMemo.md
Created February 25, 2020 06:32
Rspec memo

Rspecのメモ。ほぼ殴り書き。

Mock

インスタンスの作り方

Moduleの検証の場合はnewした無名クラスにextendする

let(:fake) do
    o = Object.new
    o.extend(Front::Supports::DmpSectionReportsSupport)
 o
@belion-freee
belion-freee / .zshrc
Last active May 11, 2019 12:57
useful alias and bash-function
# alias
alias d='docker'
alias dc='docker-compose'
alias h='heroku'
alias py='python3'
alias wi='which'
alias cl='clear'
alias to='touch'
alias to='source'
alias g='git'
@belion-freee
belion-freee / via.sh
Last active August 16, 2019 01:37
Script to make docker-compose easier to use
#!/bin/bash
dc=$(which docker-compose) # docker-compose command with full path
if [[ -x "$dc" ]]; then
:
else
echo "Please install Docker before run this command."
exit 2
fi
@belion-freee
belion-freee / .rubocop.yml
Last active August 16, 2019 01:43
I'm using this rubocop
# target_version:
# rubocop v0.74.0
#
# https://gist.github.com/onk/38bfbd78899d892e0e83
require:
- rubocop-rails
AllCops:
TargetRubyVersion: 2.5
@belion-freee
belion-freee / RailsCheatSheet.md
Last active October 16, 2019 08:33
Ruby on Rails cheat sheet

Rails関連のメモ

個人的にRailsで困ったことやHowToを記載していく。

リンク貼るだけの場合もあるけど、気にするな。

Railsの環境構築関連

Railsの環境構築(Mac)

基本的にこのエントリでOK