Skip to content

Instantly share code, notes, and snippets.

@mnishiguchi
mnishiguchi / inky-phat-name-badge.md
Last active November 21, 2021 00:01
Inky pHAT name badge example in Elixir
{"version":1,"resource":"file:///Users/mnishiguchi/Code/mnishiguchi/installers/setup_macos.sh","entries":[{"id":"gGRq.sh","timestamp":1706054272419}]}
@mnishiguchi
mnishiguchi / rails_friendly_forwarding.md
Last active February 15, 2018 01:51
Rails - redirect - friendly forwarding
@mnishiguchi
mnishiguchi / js_url.md
Last active January 8, 2019 04:14
JS - Ensure valid web url - Prepend url scheme if necessary
@mnishiguchi
mnishiguchi / rails_google_places_client.md
Last active December 14, 2017 15:20
Rails google places client
@mnishiguchi
mnishiguchi / rails_page_specific_js.md
Last active January 30, 2019 22:26
Rails asset bundles and page specific js

React form ignore enter press

    <form
      action="/users/sign_up"
      onSubmit={handleSubmit}
      onKeyPress={event => {
        if (event.which === 13 /* Enter */) {
 event.preventDefault();
@mnishiguchi
mnishiguchi / rails_page.html
Last active November 25, 2017 21:08
Rails 5 page HTML
<!DOCTYPE html>
<html>
<head>
<meta ,="" charset="UTF-8" content="text/html" http-equiv="Content-Type" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<meta name="csrf-param" content="authenticity_token" />
<meta name="csrf-token" content="UvxigyfFwCsdAvRdbYGNeJ5dqFeqao1e59gYYTg7SUfDO0Buwx7rNHtPxuy6OwRj81BrQg0CeqnCRFpNQB4now==" />
<title>DeviseWithFormik</title>
@mnishiguchi
mnishiguchi / rails_devise_sign_up_page.html
Last active November 25, 2017 21:09
Rails 5 Devise sign up page HTML
<!DOCTYPE html>
<html>
<head>
<meta ,="" charset="UTF-8" content="text/html" http-equiv="Content-Type" />
<meta content="width=device-width, initial-scale=1.0" name="viewport" />
<meta name="csrf-param" content="authenticity_token" />
<meta name="csrf-token" content="9QmqNhGdQyVYHWZHUEpR9xawbQEuMVtPTXfzUOTq4vzg4u9Adux5sLEerlz+yrFxEAVVVX1fEl1YFrSW0ZtcZA==" />
<title>DeviseWithFormik</title>