- Install GPG tools
- Install GPG tools and setup pin entry by running:
brew install gnupg pinentry-mac mkdir -m 700 -p ~/.gnupg echo "pinentry-program /usr/local/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf killall gpg-agent
| <?php | |
| return PhpCsFixer\Config::create() | |
| ->setRules(array( | |
| '@PSR2' => true, | |
| 'binary_operator_spaces' => true, | |
| 'blank_line_after_namespace' => true, | |
| 'blank_line_after_opening_tag' => true, | |
| 'blank_line_before_return' => true, | |
| 'braces' => true, |
#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.
Run the following commands in sequence.
sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
The Guardian offers an API as deep and robust as the New York Times Article API when it comes to content analysis.
The Guardian's API offers more than "1.7 million pieces of content", with published items as far back as 1999. You can register as a developer here, which gets you 5,000 API hits a day and an API key that looks something like this:
zzzyyyyy-9a9z-999z-z999-9e8a83922516
The Guardian has a handy interactive explorer to interactively tweak the query parameters.
| //First user created | |
| use admin | |
| db.createUser( | |
| { | |
| user: "admintest", | |
| pwd: "testing", | |
| roles: [ { role: "userAdminAnyDatabase", db: "admin" } ] | |
| } | |
| ) |
| //SearchController.php | |
| public function autocomplete(){ | |
| $term = Input::get('term'); | |
| $results = array(); | |
| $queries = DB::table('users') | |
| ->where('first_name', 'LIKE', '%'.$term.'%') | |
| ->orWhere('last_name', 'LIKE', '%'.$term.'%') | |
| ->take(5)->get(); |
getAllLinks.js
getAllLinks(element) - returns array of all UrlLinks in Document
findAndReplaceLinks(searchPattern,replacement) - changes all matching links in Document
changeCase.js - Document add-in, provides case-change operations in the add-in Menu.
onOpen - installs "Change Case" menu
_changeCase - worker function to locate selected text and change text case. Case conversion is managed via callback to a function that accepts a string as a parameter and returns the converted string.
helper functions for five cases