Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
| ### USAGE | |
| ### | |
| ### ./ElasticSearch.sh 1.5.0 will install Elasticsearch 1.5.0 | |
| ### ./ElasticSearch.sh 1.4.4 will install Elasticsearch 1.4.4 | |
| ### ./ElasticSearch.sh will fail because no version was specified (exit code 1) | |
| ### | |
| ### CLI options Contributed by @janpieper | |
| ### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch | |
| ### ElasticSearch version |
| <?php | |
| // app/start/global.php | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Application Error Logger | |
| |-------------------------------------------------------------------------- | |
| | | |
| | Here we will configure the error logger setup for the application which |
| var request = require("request"), | |
| cheerio = require("cheerio"), | |
| url = "https://www.google.com/search?q=data+mining", | |
| corpus = {}, | |
| totalResults = 0, | |
| resultsDownloaded = 0; | |
| function callback () { | |
| resultsDownloaded++; |
| return View.extend({ | |
| initialize: function () { | |
| this.el.attr("draggable", "true") | |
| this.el.bind("dragstart", _.bind(this._dragStartEvent, this)) | |
| }, | |
| _dragStartEvent: function (e) { | |
| var data | |
| if (e.originalEvent) e = e.originalEvent | |
| e.dataTransfer.effectAllowed = "copy" // default to copy |
| // This example shows how to render pages that perform AJAX calls | |
| // upon page load. | |
| // | |
| // Instead of waiting a fixed amount of time before doing the render, | |
| // we are keeping track of every resource that is loaded. | |
| // | |
| // Once all resources are loaded, we wait a small amount of time | |
| // (resourceWait) in case these resources load other resources. | |
| // | |
| // The page is rendered after a maximum amount of time (maxRenderTime) |
| ########################################## | |
| # To run: | |
| # curl -sSL https://gist.githubusercontent.com/sirkkalap/e87cd580a47b180a7d32/raw/d9c9ebae4f5cf64eed4676e8aedac265b5a51bfa/Install-Docker-on-Linux-Mint.sh | bash -x | |
| ########################################## | |
| # Check that HTTPS transport is available to APT | |
| if [ ! -e /usr/lib/apt/methods/https ]; then | |
| sudo apt-get update | |
| sudo apt-get install -y apt-transport-https | |
| fi |
#Simple MongoDB Security Tutorial
###1 - Start mongod without any "security option"
$ mongod --port 27017
| cd ~ | |
| wget https://downloads.wkhtmltopdf.org/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
| tar xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
| mv wkhtmltox/bin/wkhtmlto* /usr/bin | |
| apt-get install -y openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig |
| package main | |
| import( | |
| "fmt" | |
| "reflect" | |
| ) | |
| func main() { | |
| items := []int{1,2,3,4,5,6} | |
| fmt.Println(SliceExists(items, 5)) // returns true |