20170504_jeffrey - silenceuncrio/diary GitHub Wiki

0835

review

1000

按照順序掃台 - ariel 的 Change sim pin

1025

提醒 ariel 補一下 icos api 讓我能夠 get 到以下結構的設定

typedef struct _CHG_SIM_PIN_
{
    char old_sim_pin[SIM_CODE_LEN]; // Old SIM PIN
    char new_sim_pin[SIM_CODE_LEN]; // New SIM PIN
    int pincounter; // Number of attempts left to entern PIN
    int pukcounter; // Number of attempts left to entern PUK
} CHG_SIM_PIN;

1045

為了 monkeyjj 在看 Easy Laravel 5 - A Hands On Introduction Using a Real-World Project 的時候

按照 Managing Your Laravel Project Development Environment 這個章節

試著在 window 上安裝 Homestead 這個 solution

不過 Homestead 這個 solution 還需要 VagrantVirtualBox

VirtualBox 我已經有了

Vagrant 我在昨天已經裝好了

VirtualBox 讓我可以在 window 10 上跑虛擬機(ubuntu 16)

Vagrant 是什麼呢?

閱讀一下

該系列文章還有後續

不過對於 Vagrant 已經有了基本的了解 - 用來管 虛擬機 的

有了這個認知之後再來看一下 Laravel 官網怎麼來介紹 Laravel Homestead

Laravel Homestead is an official, pre-packaged Vagrant box that provides you a wonderful development environment without requiring you to install PHP, a web server, and any other server software on your local machine. No more worrying about messing up your operating system! Vagrant boxes are completely disposable. If something goes wrong, you can destroy and re-create the box in minutes!

目前我的 homestead 放在 C:\Users\JEFFREY\Homestead

Homestead.yaml 內容如下

---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox

authorize: C:\Users\JEFFREY\Homestead\homestead_rsa.puk

keys:
    - C:\Users\JEFFREY\Homestead\homestead_rsa.ppk

folders:
    - map: D:\dev.linode.monkeyjj.idv.tw\todoparrot
      to: /home/vagrant/Code

sites:
    - map: dev.linode.monkeyjj.idv.tw
      to: /home/vagrant/Code/public

databases:
    - homestead

# blackfire:
#     - id: foo
#       token: bar
#       client-id: foo
#       client-token: bar

# ports:
#     - send: 50000
#       to: 5000
#     - send: 7777
#       to: 777
#       protocol: udp

C:\Users\JEFFREY\Homestead 目錄下使用 vagrant up

C:\Users\JEFFREY\Homestead>vagrant up
Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Importing base box 'laravel/homestead'...
==> homestead-7: Matching MAC address for NAT networking...
==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> homestead-7: Setting the name of the VM: homestead-7
==> homestead-7: Clearing any previously set network interfaces...
==> homestead-7: Preparing network interfaces based on configuration...
    homestead-7: Adapter 1: nat
    homestead-7: Adapter 2: hostonly
==> homestead-7: Forwarding ports...
    homestead-7: 80 (guest) => 8000 (host) (adapter 1)
    homestead-7: 443 (guest) => 44300 (host) (adapter 1)
    homestead-7: 3306 (guest) => 33060 (host) (adapter 1)
    homestead-7: 5432 (guest) => 54320 (host) (adapter 1)
    homestead-7: 8025 (guest) => 8025 (host) (adapter 1)
    homestead-7: 27017 (guest) => 27017 (host) (adapter 1)
    homestead-7: 22 (guest) => 2222 (host) (adapter 1)
==> homestead-7: Running 'pre-boot' VM customizations...
==> homestead-7: Booting VM...
==> homestead-7: Waiting for machine to boot. This may take a few minutes...
    homestead-7: SSH address: 127.0.0.1:2222
    homestead-7: SSH username: vagrant
    homestead-7: SSH auth method: private key
    homestead-7: Warning: Connection reset. Retrying...
    homestead-7:
    homestead-7: Vagrant insecure key detected. Vagrant will automatically replace
    homestead-7: this with a newly generated keypair for better security.
    homestead-7:
    homestead-7: Inserting generated public key within guest...
    homestead-7: Removing insecure key from the guest if it's present...
    homestead-7: Key inserted! Disconnecting and reconnecting using new SSH key...
==> homestead-7: Machine booted and ready!
==> homestead-7: Checking for guest additions in VM...
==> homestead-7: Setting hostname...
==> homestead-7: Configuring and enabling network interfaces...
==> homestead-7: Mounting shared folders...
    homestead-7: /vagrant => C:/Users/JEFFREY/Homestead
    homestead-7: /home/vagrant/Code => D:/dev.linode.monkeyjj.idv.tw/todoparrot
==> homestead-7: Running provisioner: file...
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: inline script
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: inline script
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: C:/Users/JEFFREY/AppData/Local/Temp/vagrant-shell20170504-12744-prdgsl.sh
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: script: Creating Certificate: homestead.app
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: script: Creating Site: homestead.app
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: script: Checking for old Schedule
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: script: Restarting Nginx
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: script: Creating MySQL Database: homestead
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: script: Creating Postgres Database: homestead
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: script: Clear Variables
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: script: Update Composer
==> homestead-7: You are already using composer version 1.4.1 (stable channel).
==> homestead-7: Running provisioner: shell...
    homestead-7: Running: C:/Users/JEFFREY/AppData/Local/Temp/vagrant-shell20170504-12744-1a68c5n.sh

目前已經可以在網址列使用 192.168.10.10 看到 laravel 的首頁

1655

完成 ariel 的 Change sim pin

不過還沒提供 多國語言 的 key

1725

提供 多國語言 的 key 給 ariel 的 Change sim pin