Check cluster health (how many nodes are up?):
curl -s -XGET "http://127.0.0.1:9200/_cluster/health?pretty=true" | jq .
Check cluster nodes names:
curl -s -XGET 'http://localhost:9200/_nodes' | jq '.nodes[].name'
| package test | |
| import com.holdenkarau.spark.testing.{ DataFrameSuiteBase } | |
| import org.apache.spark.sql.{ DataFrame } | |
| import org.apache.spark.sql.SparkSession | |
| import org.apache.spark.sql.functions.{ array, col, collect_set, udf } | |
| import org.graphframes.GraphFrame | |
| import org.graphframes.lib.AggregateMessages | |
| import org.scalatest.FunSuite |
| exports.handler = (event, context, callback) => { | |
| const response = { | |
| statusCode: 301, | |
| headers: { | |
| Location: 'https://google.com', | |
| } | |
| }; | |
| return callback(null, response); | |
| } |
| # /tmp/test = EBS-SSD | |
| # /mnt/test = instance-store | |
| root@ip-10-0-2-6:~# dd bs=1M count=256 if=/dev/zero of=/tmp/test | |
| 256+0 records in | |
| 256+0 records out | |
| 268435456 bytes (268 MB) copied, 3.26957 s, 82.1 MB/s | |
| root@ip-10-0-2-6:~# dd bs=1M count=256 if=/dev/zero of=/tmp/test | |
| 256+0 records in | |
| 256+0 records out |
| var MyApp = angular.module('MyApp'); | |
| MyApp.factory('msgBus', ['$rootScope', function($rootScope) { | |
| var msgBus = {}; | |
| msgBus.emitMsg = function(msg, data) { | |
| data = data || {}; | |
| $rootScope.$emit(msg, data); | |
| }; | |
| msgBus.onMsg = function(msg, func, scope) { | |
| var unbind = $rootScope.$on(msg, func); | |
| if (scope) { |
| // In app.js or main.js or whatever: | |
| // var myApp = angular.module('askchisne', ['ngSanitize', 'ngAnimate', 'ui.bootstrap', 'ui.bootstrap.tpls']); | |
| // This filter makes the assumption that the input will be in decimal form (i.e. 17% is 0.17). | |
| myApp.filter('percentage', ['$filter', function ($filter) { | |
| return function (input, decimals) { | |
| return $filter('number')(input * 100, decimals) + '%'; | |
| }; | |
| }]); |
| javascript: (function () { | |
| function c() { | |
| var e = document.createElement("link"); | |
| e.setAttribute("type", "text/css"); | |
| e.setAttribute("rel", "stylesheet"); | |
| e.setAttribute("href", f); | |
| e.setAttribute("class", l); | |
| document.body.appendChild(e) | |
| } | |
| function h() { |
As configured in my dotfiles.
start new:
tmux
start new with session name:
I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.
I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real