瀏覽作者:

小幫手

MacOS「XXX.APP」已損毀,無法打開。您應該將其丟到「垃圾桶」。

當你在安裝網路上,下載下來的APP,安裝完成後出現
「XXX.APP」已損毀,無法打開。您應該將其丟到「垃圾桶」。

這時候有兩個方式可以解除

一、使用 sudo spctl --master-disable 開啟任何來源

1.關閉「系統偏好設定」
2.打開「終端機」,輸入以下指令

MacBook-Pro ~ % sudo spctl --master-disable
Password: 輸入密碼驗證

3.再次打開「系統偏好設定」 > 「安全性與隱私」 >「一般」
如下圖:

二、使用 sudo xattr -d com.apple.quarantine /Applications/xxx.app

1.打開「終端機」,輸入以下指令

MacBook-Pro ~ % sudo xattr -d com.apple.quarantine /Applications/xxx.app
Password: 輸入密碼驗證

2.重新啟動 APP 即可

[Worker Man]安裝流程-AWS

安裝說明

WorkerMan實際上就是一個PHP代碼包,如果你的PHP環境已經裝好,只需要把WorkerMan源代碼或者demo下載下來即可運行。

安裝php 7.2

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

[root@workerman ~]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Retrieving https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
warning: /var/tmp/rpm-tmp.O2pe84: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:epel-release-7-11                ################################# [100%]

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

[root@workerman ~]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Retrieving https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
warning: /var/tmp/rpm-tmp.O2pe84: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:epel-release-7-11                ################################# [100%]
閱讀更多

Unix/Linux 的 find 指令使用教學、技巧與範例整理

Find的實用教學

指定檔名搜尋

若要在目前的目錄底下,找尋檔案名稱為 gtwang.txt 的檔案,可以使用:

find . -name gtwang.txt

執行後,find 會列出所有檔名是 gtwang.txt 的檔案列表。

./gtwang/gtwang.txt

在 /home 目錄底下,找尋檔案名稱為 gtwang.txt 的檔案:

find /home -name gtwang.txt
閱讀更多

[Ubuntu]在AWS上實現 ubuntu 遠程桌面

在Linux主機上進行ssh指令操作已經一段時間了,後來想說來個圖形化介面,再加上遠端桌面,感覺就可以開始辦工了,所以在網路上找了一下相關資訊。原來這已經很多人這樣做了,這次就把相關的安裝流程寫下,方便日後安裝時使用。

所使用到的版本及套件

  • 用戶端 – Windows Remote Desktop
  • 主機端 – Ubuntu Server 18.04 LTS
  • 連線協議 – RDP / XRDP
  • 圖像桌面 – XFCE4
閱讀更多

[Brew] 如何在Mac安裝 Homebrew

How to Install Homebrew on Mac

/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

MacBook-Pro:tmp user$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following existing directories will be made group writable:
/usr/local/bin
/usr/local/include
/usr/local/lib
/usr/local/share
/usr/local/share/doc
/usr/local/share/man
/usr/local/share/man/man1
/usr/local/share/man/man5
/usr/local/share/man/man7
==> The following existing directories will have their owner set to blackie:
/usr/local/bin
/usr/local/include
/usr/local/lib
/usr/local/share
/usr/local/share/doc
/usr/local/share/man
/usr/local/share/man/man1
/usr/local/share/man/man5
/usr/local/share/man/man7
==> The following existing directories will have their group set to admin:
/usr/local/bin
/usr/local/include
/usr/local/lib
/usr/local/share
/usr/local/share/doc
/usr/local/share/man
/usr/local/share/man/man1
/usr/local/share/man/man5
/usr/local/share/man/man7
==> The following new directories will be created:
/usr/local/etc
/usr/local/sbin
/usr/local/var
/usr/local/opt
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
/usr/local/var/homebrew
/usr/local/var/homebrew/linked
/usr/local/Cellar
/usr/local/Caskroom
/usr/local/Homebrew
/usr/local/Frameworks

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod u+rwx /usr/local/bin /usr/local/include /usr/local/lib /usr/local/share /usr/local/share/doc /usr/local/share/man /usr/local/share/man/man1 /usr/local/share/man/man5 /usr/local/share/man/man7
Password:

閱讀更多

[Composer] 如何在 Mac 上安裝

如何在 Mac 上安裝 Composer

安裝composer

安裝前需確保系統PHP版本在5.3以上,在終端中執行以下命令下載Composer可執行文件:

MacBook-Pro:tmp user$ curl -sS https://getcomposer.org/installer | php

此操作會下載最新版本到當前的工作目錄中。

 

如查看Composer版本

MacBook-Pro:tmp user$ php composer.phar --version
MacBook-Pro:tmp user$ Composer version 1.7.2 2018-08-16 16:57:12

閱讀更多

[Ajax] 如何製作 header 傳送及接收資料以及 CORS 問題

如何製作 header 傳送及接收資料

之前想說在header帶上參數,就可以POST到另一個API調用資料,這是一件很單純的問題,沒想到竟然這麼多問題啊!!

研究了很久,怎麼傳都無法傳過去,

  1. 先是 CROS (Cross-origin resource sharing)
  2. header 設定方式
  3. 接收 header 的一些基本問題

以下是 ajax 的範例表式。

閱讀更多

[OpenFire] CentOS 上的安裝流程

在 CentOS 上安裝 OpenFire Server 流程

1.安裝 OpenFire Server 版程式

進入Openfire官網,下載最新版本的OpenFire,目前最新版本為4.2.3-1

官方下載:openfire-4.2.3-1.x86_64.rpm
本地下載:openfire-4.2.3-1.x86_64.rpm

[root@ip-192-168-0-11 tmp]# wget https://www.igniterealtime.org/downloadServlet?filename=openfire/openfire-4.2.3-1.x86_64.rpm
--2018-10-04 01:49:35--  https://www.igniterealtime.org/downloadServlet?filename=openfire/openfire-4.2.3-1.x86_64.rpm
Resolving www.igniterealtime.org... 52.58.216.59
Connecting to www.igniterealtime.org|52.58.216.59|:443... connected.
HTTP request sent, awaiting response... 302
Location: http://download.igniterealtime.org/openfire/openfire-4.2.3-1.x86_64.rpm [following]
--2018-10-04 01:49:36--  http://download.igniterealtime.org/openfire/openfire-4.2.3-1.x86_64.rpm
Resolving download.igniterealtime.org... 52.58.216.59
Connecting to download.igniterealtime.org|52.58.216.59|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/igniterealtime/Openfire/releases/download/v4.2.3/openfire-4.2.3-1.x86_64.rpm [following]
--2018-10-04 01:49:37--  https://github.com/igniterealtime/Openfire/releases/download/v4.2.3/openfire-4.2.3-1.x86_64.rpm
Resolving github.com... 192.30.255.113, 192.30.255.112
Connecting to github.com|192.30.255.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/18511687/1bd89d1a-2e8c-11e8-8519-efffef7273cc?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20181004%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20181004T014937Z&X-Amz-Expires=300&X-Amz-Signature=e571f68b7e78991c49d9b04dec816923c201ba2116e9656c96ce055edf8b8b73&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dopenfire-4.2.3-1.x86_64.rpm&response-content-type=application%2Foctet-stream [following]
--2018-10-04 01:49:37--  https://github-production-release-asset-2e65be.s3.amazonaws.com/18511687/1bd89d1a-2e8c-11e8-8519-efffef7273cc?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20181004%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20181004T014937Z&X-Amz-Expires=300&X-Amz-Signature=e571f68b7e78991c49d9b04dec816923c201ba2116e9656c96ce055edf8b8b73&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dopenfire-4.2.3-1.x86_64.rpm&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com... 52.216.101.147
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com|52.216.101.147|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 105731242 (101M) [application/octet-stream]
Saving to: âdownloadServlet?filename=openfire%2Fopenfire-4.2.3-1.x86_64.rpmâ
100%[=================================================>] 105,731,242 11.0M/s   in 2m 21s

2018-10-04 01:51:59 (735 KB/s) - âdownloadServlet?filename=openfire%2Fopenfire-4.2.3-1.x86_64.rpmâ

[root@ip-192-168-0-11 tmp]# yum install downloadServlet\?filename\=openfire%2Fopenfire-4.2.3-1.x86_64.rpm
Loaded plugins: presto, security
Setting up Install Process
Examining downloadServlet?filename=openfire%2Fopenfire-4.2.3-1.x86_64.rpm: openfire-4.2.3-1.x86_64
Marking downloadServlet?filename=openfire%2Fopenfire-4.2.3-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package openfire.x86_64 0:4.2.3-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================
 Package Arch   Version Repository                                                    Size
===========================================================================================
Installing:
 openfire
         x86_64 4.2.3-1 /downloadServlet?filename=openfire%2Fopenfire-4.2.3-1.x86_64 256 M

Transaction Summary
===========================================================================================
Install       1 Package(s)

Total size: 256 M
Installed size: 256 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : openfire-4.2.3-1.x86_64                                                 1/1
  Verifying  : openfire-4.2.3-1.x86_64                                                 1/1

Installed:
  openfire.x86_64 0:4.2.3-1

Complete!

閱讀更多

[vue]建立 Vue.js 專案的工具

建立 Vue.js 專案的工具,對於 Node.js 工具熟悉的開發者,推薦使用 vue-cli。

1.安裝Node.js官方版本

https://nodejs.org/en/download/

Latest LTS Version: 8.12.0 (includes npm 6.4.1) 2018-09-26

2.Node.js 版本及更新常用指令

node -v #檢查 Node.js 的版本

更新 Node.js 到最新版本

Windows

C:\Users> npm cache clean -f #清除 npm 快取
C:\Users> npm install -g n   #安裝 n,n 是管理 Node.js 版本的 module
C:\Users> n stable           #安裝穩定版的 Node.js
C:\Users> node -v            #確認目前的版本

Linux

[root@ip-1-31-37-203 ~]# nvm

Node Version Manager

Usage:
    nvm help                    Show this message
    nvm --version               Print out the latest released version of nvm
    nvm install [-s] <version>  Download and install a <version>, [-s] from source
    nvm uninstall <version>     Uninstall a version
    nvm use <version>           Modify PATH to use <version>
    nvm run <version> [<args>]  Run <version> with <args> as arguments
    nvm current                 Display currently activated version
    nvm ls                      List installed versions
    nvm ls <version>            List versions matching a given description
    nvm ls-remote               List remote versions available for install
    nvm deactivate              Undo effects of NVM on current shell
    nvm alias [<pattern>]       Show all aliases beginning with <pattern>
    nvm alias <name> <version>  Set an alias named <name> pointing to <version>
    nvm unalias <name>          Deletes the alias named <name>
    nvm copy-packages <version> Install global NPM packages contained in <version> to current version

Example:
    nvm install v0.10.24        Install a specific version number
    nvm use 0.10                Use the latest available 0.10.x release
    nvm run 0.10.24 myApp.js    Run myApp.js using node v0.10.24
    nvm alias default 0.10.24   Set default node version on a shell

Note:
    to remove, delete or uninstall nvm - just remove ~/.nvm, ~/.npm and ~/.bower folders

[root@ip-1-31-37-203 ~]# nvm install v6.11.0

閱讀更多