This file contains hidden or 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
| sudo apt-get install -y git build-essential openjdk-6-jdk python-dev python-boto libcurl4-nss-dev libsasl2-dev autoconf libtool maven | |
| git clone http://git-wip-us.apache.org/repos/asf/mesos.git | |
| cd mesos | |
| ./bootstrap | |
| mkdir build | |
| cd build | |
| ../configure | |
| make -j 4 | |
| make check |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "github.com/opesun/goquery" | |
| "strings" | |
| ) | |
| const wikiBase string = "http://en.wikipedia.org" | |
| const wikiAPIURL string = "http://en.wikipedia.org/w/api.php?format=json&action=query&titles=$title&prop=revisions&rvprop=content" |
This file contains hidden or 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
| ps -ef | grep tomcat | awk '{print $2}' | xargs kill -9 |
This file contains hidden or 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 https://godeb.s3.amazonaws.com/godeb-amd64.tar.gz | |
| tar -zxf godeb-amd64.tar.gz | |
| ./godeb install |
This file contains hidden or 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
| import gevent, urllib2 | |
| urls = ["http://ppcdn.500px.org/53472962/016dc8008e0e1b0a71437a18ec4ef502c0e69cf6/5.jpg", "http://ppcdn.500px.org/53498178/0d13aa906538a8021568b948edfe3a3b3343dcf2/5.jpg", "http://ppcdn.500px.org/53495988/69d5a868beb9a4610e06ad1d64efa10204f8f45c/5.jpg", "http://ppcdn.500px.org/53488670/be88ee3404909ffb5e0f058133c8cb3cb3c61582/5.jpg", "http://ppcdn.500px.org/53472200/d23ece8bf9ab2f405b396edaf38a6ef77aab0c1e/5.jpg", "http://ppcdn.500px.org/53450310/977ea22beefa8c7148b3155bd829209a3ccf3330/5.jpg", "http://ppcdn.500px.org/53503408/5ed549003f8e919a3bf4b55f1e47dfa76ff77218/5.jpg", "http://ppcdn.500px.org/53496530/4a724f69bb4c1cb5e890594967572584f0c405cc/5.jpg", "http://ppcdn.500px.org/53493274/d55f2a1c0e639888d2ac7f20c04d360a18a75511/5.jpg", "http://ppcdn.500px.org/53478682/60a97a27221b471a00d2ea4c8a080cdf05350865/5.jpg", "http://ppcdn.500px.org/53472206/c99f0f1329f9ba908080cfb20def5fae433163da/5.jpg", "http://ppcdn.500px.org/53470904/5b99c63c3f1d1d19e01e73f49e88d72dc5776dca/5.jpg", "http:/ |
This file contains hidden or 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
| # ubuntu 14.01 comes with nginx I guess.For simple testing purposes I use apache2. | |
| ######################################################## | |
| # Assumption | |
| # - nginx & apache2 have already been installed on ubuntu 14.04 | |
| # Goal |
This file contains hidden or 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
| rabbitmq-plugins enable rabbitmq_management |
This file contains hidden or 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
| var input = process.argv.slice(2); | |
| var request = require('request'), cheerio = require('cheerio'); | |
| req = request.defaults({ | |
| jar : true, | |
| rejectUnauthorized : false, | |
| followAllRedirects: true | |
| }); | |
| function getContentAndScrape (url, selector) { | |
| //Get Ingredients | |
| req.get({ |
This file contains hidden or 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
| #Importing Requests package | |
| Pkg.add("Requests") | |
| using Requests.get; | |
| import JSON; | |
| url = "http://query.yahooapis.com/v1/public/yql?q=select%20DaysRange%20from%20yahoo.finance.quotes%20where%20symbol%20in%20%28%22EBAY%22,%22GOOG%22%29%20&env=http://datatables.org/alltables.env&format=json"; | |
| #Reads the data from HTTP URL | |
| es = get(url); |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "io/ioutil" | |
| "bytes" | |
| "strconv" | |
| "math/rand" | |
| ) |
OlderNewer