-
Open a browser
# start an instance of firefox with selenium-webdriver driver = Selenium::WebDriver.for :firefox # :chrome -> chrome # :ie -> iexplore
- Go to a specified URL
var google = require('google'); | |
var request = require('request'); | |
var cheerio = require('cheerio'); | |
var fs = require('fs'); | |
/* SOCIAL MEDIA WEBSITES REGEX */ | |
var socialURLS = { | |
'fb': /\bfacebook.com\b/, | |
'tw': /\btwitter.com\b/, | |
'gplus': /\bplus.google.com\b/, |
# set date variables | |
TODAY=`date --date= +%Y-%m-%d` | |
FIRST_DAY_PREVIOUS_MONTH=`date --date="-1 month" +%Y-%m-01` | |
LAST_DAY_PREVIOUS_MONTH=`date -d "-$(date +%d) days" +%Y-%m-%d` | |
#get english month | |
ENGLISH_MONTH=`date "+%B"` | |
# Get today's quarter and year |
// custom implementation of reduce fn just for fun | |
Array.prototype.myReduce = function(fn, customStart) { | |
var result = customStart ? customStart : null; | |
for(var i=0;i<this.length;i++) { | |
result = fn(result, this[i]) | |
} | |
return result | |
}; | |
FROM factual/docker-cdh5-swissarmy:latest | |
RUN apt-get -y update | |
CMD curl -XPOST "http://admin.prod.factual.com/geopulse/send_stale_designs" |
const schema = [ | |
{ klass: 'Places', validvalues: [ 'Chain', 'Category' ], validOperators: [ '$and', '$or' ] }, | |
{ klass: 'Chain', validvalues: [], validOperators: ['$in', '$nin'] }, | |
{ klass: 'Category', validvalues: [], validOperators: ['$in', '$nin'] } | |
] | |
function generateSubqueries(klass, validvalues) { | |
validvalues.forEach((subquery) => { | |
klass.prototype[`add${subquery}`] = function(operator, value) { |
Picking the right architecture = Picking the right battles + Managing trade-offs
" Section: General Config {{{1 | |
" ---------------------------- | |
set shell=zsh " Set bash as the prompt for Vim | |
set backspace=2 " Backspace deletes like most programs in insert mode | |
set ruler " show the cursor position all the time | |
set laststatus=2 " Always display the status line | |
set shiftround | |
set scrolloff=3 | |
set list listchars=tab:»·,trail:· " Display extra whitespace characters | |
set hidden |