Skip to content

Instantly share code, notes, and snippets.

seiyamaeda seiyamaeda

Block or report user

Report or block seiyamaeda

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
@seiyamaeda
seiyamaeda / hello.mat
Created Mar 2, 2018
.mat シンタックスコードハイライト確認
View hello.mat
# Created by Octave 3.8.0, Fri Mar 02 15:06:33 2018 JST <seiyamaeda@SeiyanoMacBook-Pro.local>
# name: A
# type: matrix
# rows: 3
# columns: 2
1 2
2 4
5 6
@seiyamaeda
seiyamaeda / check_isnull_data.ipynb
Last active Mar 3, 2018
anaconda3/ml_learning/kaggle/check_isnull_data.ipynb
View check_isnull_data.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@seiyamaeda
seiyamaeda / titanic.ipynb
Last active Mar 5, 2018
The first attack Titanic: Machine Learning from Disaster for Competition
View titanic.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@seiyamaeda
seiyamaeda / app|views|hoges|new.html.slim
Last active Mar 29, 2018
Open modal view on AdminLTE ver2 (with Bootstrap 3.3.6)
View app|views|hoges|new.html.slim
/ the way it uses font awesome
= link_to '#', data: { toggle: 'modal', target: '#hoge-modal' } do
i.fa.fa-question-circle
end
== render partial: 'layouts/shared/modals/hoge'
@seiyamaeda
seiyamaeda / get_datetime_from_time.rb
Last active Mar 29, 2018
Get the datetime from time. / E.g. From request params
View get_datetime_from_time.rb
def get_datetime_converted_from_time
time = Time.zone.now
splited_time = params[:object][:time].split(':')
local_time = Time.local(
time.year,
time.month,
time.day,
splited_time.first.to_i,
splited_time.last.to_i,)
View only_send_email_to_user.rb
def send_email_to_user
email_params = {
subject: params[:subject],
to_email: params[:to_email],
from_email: params[:from_email],
description: params[:description],}
HogeMailer.send_email_to_user(email_params)
render :nothing => true
end
@seiyamaeda
seiyamaeda / Gemfile
Last active Mar 31, 2018
Kaminari on 'Ruby on Rails 5.1.4'
View Gemfile
gem 'kaminari'
@seiyamaeda
seiyamaeda / app|assets|javascripts|hoge.coffee
Last active Apr 2, 2018
How to make the disabled-link with CoffeeScript / for Ruby on Rails 5.1.4
View app|assets|javascripts|hoge.coffee
$(document).on 'turbolinks:load', ->
do ->
$('.disabled-link').click (e) ->
e.preventDefault()
return
@seiyamaeda
seiyamaeda / Gemfile
Last active Apr 3, 2018
How to use 'Cocoon' | Ruby on Rails 5.1.4 | AdminLTE ver2 (with Bootstrap 3.3.6) | Model 'Hoge' and 'Model 'Fuga' are 'one-to-many relationship'
View Gemfile
gem 'cocoon'
gem 'jquery-rails'
@seiyamaeda
seiyamaeda / app|assets|javascripts|application.js
Last active Apr 3, 2018
How to use DatePicker in AdminLTE ver2 (with Bootstrap 3.3.6)
View app|assets|javascripts|application.js
:
:
//= require admin-lte/plugins/datepicker/bootstrap-datepicker
//= require admin-lte/plugins/datepicker/locales/bootstrap-datepicker.ja
You can’t perform that action at this time.