This file contains 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
// Setup the service object | |
$client_id = 'xxx.apps.googleusercontent.com'; | |
$service_account_name = 'xxx@developer.gserviceaccount.com'; | |
$client_secret = 'notasecret'; | |
$keyfile = 'path_to_your_key.p12'; | |
$client->setClientSecret($client_secret); | |
$client->setAssertionCredentials( | |
new Google_Auth_AssertionCredentials( |
This file contains 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
// Sample from: https://developers.google.com/analytics/solutions/articles/hello-analytics-api | |
// Download the API Client on https://github.com/google/google-api-php-client/tree/master/src | |
// Require 'Google/Client.php' and set your include path to include the src dir, i.e.: | |
set_include_path(join(":", array(get_include_path(), | |
YOUR_APP_PATH.'/google-api-php-client/src', | |
))); | |
// Setup the service object |
This file contains 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
Login to the Google account which has access to your analytics | |
Create an OAuth key on https://console.developers.google.com/ | |
Store the keyfile in your app (and add it to gitignore) | |
Add your "xxx@developer.gserviceaccount.com" account to Google Analytics as a "Read & Analyze" user | |
Use the code from https://developers.google.com/analytics/solutions/articles/hello-analytics-api to get started |
This file contains 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
wget http://www.phabricator.com/rsrc/install/install_ubuntu.sh | |
bash install_ubuntu.sh | |
sudo vim /etc/apache2/sites-enabled/000-default | |
################ | |
<VirtualHost *> | |
# Change this to the domain which points to your host. | |
ServerName codereview.localhost |
This file contains 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
<VirtualHost *:80> | |
DocumentRoot /home/user/app/ | |
<Directory /home/user/app/> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride All | |
Order allow,deny | |
allow from all | |
</Directory> | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
LogLevel warn |
NewerOlder