Skip to content

Instantly share code, notes, and snippets.

View axtutuu's full-sized avatar
🦄
On vacation

Kawasaki Atsushi axtutuu

🦄
On vacation
View GitHub Profile
@axtutuu
axtutuu / classroom.rb
Created November 28, 2018 08:47
classroom.rb
class ClassRoom
def initialize
@students = []
end
def save name, gender
@students.push(
{ name: name, gender: gender }
)
end
@axtutuu
axtutuu / calendar.rb
Created September 14, 2018 06:35
Ruby Calendar
require 'date'
## カレンダー出力
class Calender
def initialize year, month
@beginning_of_day = Date.new(year, month, 1)
end
# @example
# SUN MON TUE WED THU FRI SAT
;;; init.el --- Spacemacs Initialization File
;;
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
@axtutuu
axtutuu / jmeter.md
Last active November 28, 2016 08:05
jmeter

複数台での負荷サーバー設定(jmeter)

概要

document http://jmeter.apache.org/usermanual/

masterサーバーにremote hostを設定後、slaveサーバーから負荷試験を実施

手順

@axtutuu
axtutuu / .gitignore
Last active November 26, 2016 05:24
画像、合成テスト
gems/
@axtutuu
axtutuu / Gemfile
Last active November 24, 2016 07:09
tweet取得
# frozen_string_literal: true
source "https://rubygems.org"
# gem "rails"
gem "oauth"
gem "dotenv"
gem "pry"
# for active_support/core_ext
gem "rails"
@axtutuu
axtutuu / .vimrc
Created November 21, 2016 14:30
vimrc
"------------------------------------------------
" プラグインのインストール
"------------------------------------------------
filetype plugin indent off
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim
call neobundle#begin(expand('~/.vim/bundle/'))
NeoBundleFetch 'Shougo/neobundle.vim'
@axtutuu
axtutuu / cron.sh
Created November 21, 2016 13:31
crontabメモ
# 書き方
分 時 日 月 曜日 コマンド
# 曜日
# 0, 7 => 日曜日
# 1 ~ 6 => 月曜日 ~ 金曜日
# cron一覧を確認 crontab -l
# cronの削除 crontab -r ※警告なしに全て消えるので注意
@axtutuu
axtutuu / filter_parameter_logging.rb
Created October 21, 2016 09:48
Railsのlog フィルダリング方法
# config/initializers/filter_parameter_logging.rb
Rails.application.config.filter_parameters += [:password]
@axtutuu
axtutuu / aec_cipher.rb
Created October 7, 2016 03:08
Ruby DES-ECB & PKCS5Padding で暗号化
# 暗号モード: ECB
# パディング方式: PKCS5Padding
# OpenSSL::Cipher.ciphers で利用可能な暗号方式名を取得可能
# https://docs.ruby-lang.org/ja/latest/class/OpenSSL=3a=3aCipher.html
module AesCipher extend self
KEY = "Your key"
CIPHER = "DES-ECB"
def encrypt(text)