This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dependencies | |
# - brew install gnu-sed | |
FILES='content/posts/*.md' | |
prefix='[[:digit:]][[:digit:]][[:digit:]][[:digit:]]-[[:digit:]][[:digit:]]-[[:digit:]][[:digit:]]-' | |
suffix='.md' | |
for f in $FILES | |
do | |
# Insert slug from file name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm i -S @nuxtjs/sentry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RSpec.configure do |config| | |
config.prepend_after(:each, type: :feature) do | |
Capybara.execute_script 'localStorage.clear()' | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bundle exec rails g devise:controllers users |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
*= require_self | |
*/ | |
@import fonts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<%= csrf_meta_tags %> | |
<%= wicked_pdf_stylesheet_link_tag 'application' %> | |
<!-- 本番環境で動作しなくなる --> | |
<!-- <%= wicked_pdf_javascript_include_tag 'pdf' %> --> | |
<%= javascript_include_tag wicked_pdf_asset_base64('pdf') %> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window) | |
••• | |
.on("page:before-change turbolinks:before-visit", function () { | |
if (window.appName.formDirty || CKEDITOR.hasDirtyForm()) { | |
return confirm(window.appName.dirtyMessage); | |
} | |
}) | |
.bind("beforeunload", function (event) { | |
if (!window.appName.formSubmit && (window.appName.formDirty || CKEDITOR.hasDirtyForm()) { | |
event.returnValue = window.appName.dirtyMessage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SampleModel < ApplicationRecord | |
before_validation :clear_password | |
••• | |
private | |
••• | |
def clear_password | |
unless self.open_with_pw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 追記 | |
import APIError from './APIError' | |
export function send (url, method, body) { | |
const headers = new Headers({ | |
'Content-Type': 'application/json' | |
}) | |
const options = { | |
method: method, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'carrierwave-audio', git: 'git@github.com:tanakaworld/carrierwave-audio.git' |
NewerOlder