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
#!/bin/bash | |
# Install Xcode Command Line Tools first (required) | |
xcode-select --install | |
# Check PHP version `php --version` | |
PHP_VER=$(php -v | head -1 | awk '{ print $2 }') | |
# Extensions directory (default: empty string) | |
EXT_DIR="" |
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
PHP_VER="5.5.14" | |
# Check if extension exists first | |
php -m | grep pgsql | |
# Update brew and install requirements | |
brew update | |
brew install autoconf | |
# Download PHP source and extract |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
class FirstClass: | |
def __init__(self, value): | |
self.value = value | |
class SecondClass: | |
def __init__(self): | |
self.a = 'a' | |
self.b = FirstClass('b') | |
def confuse_me(self): |
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
/* | |
* Get sentiment from Google Cloud Natural Language API | |
*/ | |
var getSentiment = function(text) { | |
var apiKey = PropertiesService.getScriptProperties().getProperty("apiKey") | |
var url = "https://language.googleapis.com/v1/documents:analyzeSentiment?key=%KEY".replace("%KEY", apiKey) | |
var data = { | |
document: { | |
language: "en-us", |