Skip to content

Instantly share code, notes, and snippets.

View sunny4381's full-sized avatar

NAKANO Hideo sunny4381

  • 株式会社ウェブチップス
View GitHub Profile
#
# 使用方法:
# bundle exec rails runner all_contents_download.rb www > all_contents.csv
#
site = Cms::Site.find_by(host: ARGV[0])
exporter = Cms::AllContent.new(site: site)
enumerable = exporter.enum_csv(encoding: "Shift_JIS")
enumerable.each do |csv|
STDOUT.write csv
# SHIRASAGI OAuth 2.0 IdP 機能を利用したサンプルプログラム
# このサンプルでは jwt 拡張フローを用います。
#
# 実行方法
# bin/rails runner oauth2_sample_with_jwt_flow.rb
# ドメイン
your_domain = "https://localhost:3551/"
# トークンエンドポイントの URL
token_url = URI.join(your_domain, "/.mypage/login/oauth2/token")
# SHIRASAGI OAuth 2.0 IdP 機能を利用したサンプルコード
# このサンプルでは implicit flow を用います。
#
# 実行方法
# bin/rails runner oauth2_sample_with_implicit_flow.rb
# ドメイン
your_domain = "https://localhost:3551/"
# 認可エンドポイントの URL
authorize_url = URI.join(your_domain, "/.mypage/login/oauth2/authorize")
# SHIRASAGI OAuth 2.0 IdP 機能を利用したサンプルコード
# このサンプルでは authorization code flow を用います。
#
# 実行方法
# bin/rails runner oauth2_sample_with_authorization_code_flow.rb
# ドメイン
your_domain = "https://localhost:3551/"
# 認可エンドポイントの URL
authorize_url = URI.join(your_domain, "/.mypage/login/oauth2/authorize")
data:text/html,<html contenteditable> <script>window.onbeforeunload=function(){ return "%E9%96%89%E3%81%98%E3%81%BE%E3%81%99%E3%81%8B%EF%BC%9F" }</script>
brew doctor で sudo xcode-select --install を実行しろと表示され実行するものの、また sudo xcode-select --install を実行しろと言われる場合:
次のコマンドを実行する
xcodebuild -runFirstLaunch
以下のコマンドを実行した後で bundle install を実行する
bundle config build.debase --with-cflags="-Wno-error=implicit-function-declaration"
# 少し凝った zshrc
# License : MIT
# http://mollifier.mit-license.org/
########################################
# 環境変数
#export LANG=ja_JP.UTF-8
#export PATH="/usr/local/opt/imagemagick@6/bin:$PATH"
#export PATH="/usr/local/opt/mongodb-community@4.2/bin:$PATH"
#export PATH="/usr/local/sbin:$PATH"
#!/bin/bash
port=3000
bundle exec rake db:drop
rm -rf private public
git checkout -- private public
bundle exec rake db:create_indexes
bundle exec rake ss:create_site data="{ name: '自治体サンプル', host: 'www', domains: 'www.example.jp:$port', mypage_domain: 'localhost:$port', map_api: 'openlayers' }"
bundle exec rake ss:create_site data="{ name: '企業サンプル', host: 'company', domains: 'company.example.jp:$port', mypage_domain: 'localhost:$port', map_api: 'openlayers' }"
@sunny4381
sunny4381 / how-to-buid-jquery-ui.md
Last active February 2, 2021 04:17
How to build jquery-ui

How to build jquery-ui

Setup Environment

anyenv

jquery-ui のビルドには node と java が必要です。 node は nodenv を用いてインストールします。 java は brew でインストールするのですが容易にバージョン切り替えできるようにしておいた方が良いと思うので jenv もインストールして java のバージョンを切り替えられるようにします。