STEP 1: First Install HomeBrew, download it from http://brew.sh
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
STEP 2: Install Hadoop
$ brew search hadoop
$ brew install hadoop
STEP 1: First Install HomeBrew, download it from http://brew.sh
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
STEP 2: Install Hadoop
$ brew search hadoop
$ brew install hadoop
local redis_c = require "resty.redis" | |
local ok, new_tab = pcall(require, "table.new") | |
if not ok or type(new_tab) ~= "function" then | |
new_tab = function (narr, nrec) return {} end | |
end | |
local _M = new_tab(0, 155) |
Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112
For older versions of Spark and ipython, please, see also previous version of text.
curl --connect-timeout 15 -v --insecure "smtp://smtp.example.com:25" -u "username:password" | |
\ --mail-from "[email protected]" --mail-rcpt "[email protected]" | |
\ -T email-contents.txt --ssl |
/Applications/TemperatureMonitor.app/Contents/MacOS/tempmonitor -a -l -f | | |
while read reading; do | |
set -- $reading; | |
temperature="${@:$[$#-1]:1}"; | |
sensor="${@:2:$[$#-3]}"; | |
sensor="${sensor:0:$[${#sensor}-1]}"; | |
sensor="${sensor//(}"; | |
sensor="${sensor//)}"; |
Vagrant 1.6 has a really nice feature which allows you to run a docker environment from any machine that can run Vagrant (even a Mac)
Behind the scenes, Vagrant creates a host VM which runs the docker containers.
The "gotcha" is: Vagrant won't automatically forward ports all the way back from the container->vagrant host VM->your mac. You have to do that step manually, by configuring your own host VM for Vagrant to use for hosting docker containers with. That host VM is told what ports to open.
Here's how I set up a local Wordpress development testing container.
--- | |
- name: Deploy new site release | |
user: deployer | |
hosts: all | |
tasks: | |
- name: Fetch repo updates | |
git: > | |
[email protected]:my/repo.git |
After finding a lot of other posts on the topic that didn't work out for me this one did the trick so I'm reposting for my own sense of self preservation.
Copy the Virtualbox autostart plist template file to your system's LaunchDaemons folder.
sudo cp \
/Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist \
Originally published in June 2008
When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.
To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.
Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.
#Using Scrapy with Selenium to scape a rendered page [Updated] | |
from scrapy.contrib.spiders.init import InitSpider | |
from scrapy.http import Request, FormRequest | |
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor | |
from scrapy.contrib.spiders import CrawlSpider, Rule | |
from scrapy.spider import BaseSpider | |
from scrapy.selector import HtmlXPathSelector | |
from selenium import selenium |