This file contains hidden or 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
<table class="table table-responsive alias-table"> | |
<%= f.fields_for :part_number_aliases, wrapper: false do |pnaf| %> | |
<tr class="fields"> | |
<td> | |
<%= pnaf.text_field :alias_code, label: "氏名" %> | |
<%= pnaf.text_field :alias_name, label: "年齢" %> | |
<%= pnaf.link_to_remove 'ユーザー削除', class: "btn btn-default" %> | |
</td> | |
</tr> | |
<% end %> |
This file contains hidden or 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
has_many :users | |
accepts_nested_attributes_for :users, reject_if: :all_blank |
This file contains hidden or 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
<%= bootstrap_nested_form_for(@model_a, layout: :horizontal, label_col: "col-xs-2", control_col: "col-xs-10") do |f| %> | |
<%= f.text_field :column_a, label: "カラムA" %> | |
<%= f.text_field :column_b, label: "カラムB" %> | |
. | |
. | |
. | |
<ul class="nav nav-tabs" role="tablist" id="model-b-tab-list"> | |
</ul> | |
<div class="tab-content" id="model-b-tab-contents"> |
This file contains hidden or 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
# 下の2つの設定はコメントアウト | |
# <VirtualHost *:80> | |
# ServerAdmin [email protected] | |
# DocumentRoot "/opt/lampp/docs/dummy-host.example.com" | |
# ServerName dummy-host.example.com | |
# ServerAlias www.dummy-host.example.com | |
# ErrorLog "logs/dummy-host.example.com-error_log" | |
# CustomLog "logs/dummy-host.example.com-access_log" common | |
# </VirtualHost> |
This file contains hidden or 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
def setup(cs=11, clk=12, dio=13): | |
global ADC_CS, ADC_CLK, ADC_DIO | |
ADC_CS = cs | |
ADC_CLK = clk | |
ADC_DIO = dio | |
GPIO.setwarnings(False) | |
- GPIO.setmode(GPIO.BOARD) # Number GPIOs by its physical location | |
+ GPIO.setmode(GPIO.BCM) | |
GPIO.setup(ADC_CS, GPIO.OUT) # Set pins' mode is output | |
GPIO.setup(ADC_CLK, GPIO.OUT) # Set pins' mode is output |
This file contains hidden or 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
int led = 13; | |
void setup() { | |
// put your setup code here, to run once: | |
pinMode(led, OUTPUT); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
digitalWrite(led, HIGH); |
This file contains hidden or 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
# ベースのアップデート | |
$ sudo apt-get update | |
$ sudo apt-get upgrade -y | |
$ sudo apt-get dist-upgrade | |
# 必要なライブラリのインストール | |
$ sudo pip install xbee |
This file contains hidden or 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
$ openssl genrsa -out rsa_private.pem 2048 | |
$ openssl rsa -in rsa_private.pem -pubout -out rsa_cert.pem |
This file contains hidden or 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
$ cp -r app/template/default/ app/template/[テンプレートコード]/ | |
$ cp -r src/Eccube/Resource/template/default/* app/template/[テンプレートコード]/ |
This file contains hidden or 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
. | |
. | |
. | |
# These need to be set in /etc/apache2/envvars | |
User ${APACHE_RUN_USER} | |
Group ${APACHE_RUN_GROUP} | |
. | |
. | |
. |
OlderNewer