Skip to content

Instantly share code, notes, and snippets.

  • vagrant box
    • add # ボックスを追加します
      • -f, --force # ボックスが存在しても強制的に上書きします。
      • --insecure # SSL証明書を検証しません。
      • --provider provider # ボックスを取得するプロバイダを指定します。
      • -h, --help # ヘルプを表示します。
    • list # ボックスを一覧表示します。
      • -h, --help # ヘルプを表示します。
    • remove # ボックスを削除します。
  • -h, --help # ヘルプを表示します。
@tsubakimoto
tsubakimoto / gist:5517470
Last active December 16, 2015 23:59
ソーシャルアカウントでログインする際のテーブル構成

Twitter

  • tw_user_id varchar(30) unique
  • tw_screen_name varchar(15)
  • tw_access_token varchar(255)
  • tw_access_token_secret varchar(255)

Facebook

  • fb_user_id varchar(30) unique
  • fb_name varchar(255)
  • fb_picture varchar(255)
# Github.com のアカウントを作成し、ログインする。
# Github用の公開鍵、秘密鍵を生成する。
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/matsumura/.ssh/id_rsa):
Created directory '/home/matsumura/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/matsumura/.ssh/id_rsa.
# Gitのインストール
$ sudo yum -y install git-core
Loaded plugins: fastestmirror, security
base | 3.7 kB 00:00
base/primary_db | 3.5 MB 00:06
extras | 3.5 kB 00:00
extras/primary_db | 24 kB 00:00
updates | 3.5 kB 00:00
updates/primary_db | 4.3 MB 00:07
Setting up Install Process

Azure社内勉強会 #1 の資料です。

Microsoft Azure とは

Azure は、コンピューティング、ストレージ、データ、ネットワーク、およびアプリケーション サービスを提供する、エンタープライズ レベルのクラウド プラットフォームです。

(引用:Azure: Microsoft のクラウド コンピューティング プラットフォーム

Azureでできること

日本マイクロソフト 井上大輔氏のスライド の20ページめ

public class FizzBuzz
{
public static string Say(int n)
{
if (n < 1)
throw new ArgumentOutOfRangeException();
if (n % 3 == 0 && n % 5 == 0)
return "Fizz Buzz";

Windows Modules

win_chocolatey

Installs packages using chocolatey (chocolateyを使ってパッケージをインストールします)

win_feature

Installs and uninstalls Windows Features (Windowsの機能をインストール/アンインストールします)

win_get_url

Fetches a file from a given URL (指定したURLからファイルを取得します)

Azure の管理証明書を作る

Visual Studio 開発者ツールで以下を入力

makecert -r -pe -n CN=azure-cert -sky exchange azure.cer -sv azure.pvk

pvk2pfx -pvk azure.pvk -spc azure.cer -pfx azure.pfx

OpenSSL をインストールして以下を入力

vagrant up

vagrant ssh host

cp /vagrant/hosts .

chmod -x hosts

cp /vagrant/ansible.cfg .

参考

手順

  • Visual Studio のインストール時に提供される 開発者コマンドプロンプト を起動する。
    • 筆者の環境のインストールパスは C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts である。
  • makecert -sky exchange -r -n "CN=azure" -pe -a sha1 -len 2048 -ss My "azure.cert"
  • Azure にログイン
  • 左メニューの「設定」をクリックする