Skip to content

Instantly share code, notes, and snippets.

@y-temp4
y-temp4 / HTML出力結果
Last active February 6, 2020 00:45
RailsでjQueryを読み込まずにmethod: :deleteのリンクを実現する(Routing Error No route matches [GET] ... の対処法) ref: https://qiita.com/y-temp4/items/2d50feb3ff0d65acdf67
<form class="button_to" method="post" action="/users/sign_out">
<input type="hidden" name="_method" value="delete">
<input type="submit" value="ログアウト">
<input type="hidden" name="authenticity_token" value="(省略)">
</form>
@y-temp4
y-temp4 / hoge.html.erb
Created June 11, 2016 14:31
viewでbinding.pryするやつ
<% require 'pry'; binding.pry %>
@y-temp4
y-temp4 / file0.js
Created July 15, 2016 22:37
JavaScriptで指定したURLにページ遷移する方法 ref: http://qiita.com/y-temp4/items/94727de9f2029a357e09
location.href = 'http://example.com';
@y-temp4
y-temp4 / file0.txt
Created October 19, 2016 21:05
Pry実行時のエラー「Sorry, you can't use Pry without Readline or a compatible library.・・・」を解決する ref: http://qiita.com/y-temp4/items/7f3d394cfed83c486f15
$ pry
Sorry, you can't use Pry without Readline or a compatible library.
Possible solutions:
* Rebuild Ruby with Readline support using `--with-readline`
* Use the rb-readline gem, which is a pure-Ruby port of Readline
* Use the pry-coolline gem, a pure-ruby alternative to Readline
...
@y-temp4
y-temp4 / file0.sh
Created November 3, 2016 04:16
Elixirを使うためにanyenv経由でOSXにexenvをインストールした ref: http://qiita.com/y-temp4/items/41e5c9422ebffc7e909e
$ anyenv install erlenv
$ exec $SHELL -l
$ brew install unixodbc wxmac fop
$ wget http://www.erlang.org/download/otp_src_19.1.tar.gz
$ tar zxf otp_src_19.1.tar.gz
$ cd otp_src_19.1
$ ./configure --prefix=$HOME/.anyenv/envs/erlenv/releases/19.1 --enable-dynamic-ssl-lib --with-ssl=/usr/local/opt/openssl
$ make -j 4
$ make install
$ erlenv global 19.1
@y-temp4
y-temp4 / file0.txt
Last active November 10, 2016 01:09
Project EulerのSmallest multipleをElixirで解く ref: http://qiita.com/y-temp4/items/865b17837a4fb9eaf86f
LCM = \frac{a \times b}{GCD}
@y-temp4
y-temp4 / MyList.exs
Last active November 29, 2016 13:26
プログラミングにおけるアキュムレータとは何か? ref: http://qiita.com/y-temp4/items/08063349e6f965633663
defmodule MyList do
def sum([]), do: 0
def sum([ head | tail ]), do: head + sum(tail)
end
@y-temp4
y-temp4 / .eslintignore
Last active February 5, 2017 19:57
ESLintの使い方とAtomでの初期設定など ref: http://qiita.com/y-temp4/items/aed2904ff04e9a3f6af1
node_modules/
test/
@y-temp4
y-temp4 / file0.txt
Created April 12, 2017 13:41
react-webpack-rails-tutorialのBasic Demo Setupでコケまくったのでメモ ref: http://qiita.com/y-temp4/items/bea028dd9e5534aaa6a3
$ brew install [email protected]
$ brew link --force qt55
@y-temp4
y-temp4 / .gitignore
Created May 4, 2017 01:05
Webpackerのディレクトリ構成をRailsから切り離す形に変える方法 ref: http://qiita.com/y-temp4/items/917fd541676bd04b78a9
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
# Ignore bundler config.
/.bundle
# Ignore all logfiles and tempfiles.