Skip to content

Instantly share code, notes, and snippets.

View nyimbi's full-sized avatar

Nyimbi Odero nyimbi

  • Datacraft
  • Nairobi
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nyimbi
nyimbi / Java.md
Created May 7, 2018 07:31 — forked from JeOam/Java.md
Install Java 8 on OS X

on El Capitan, after installing the brew...

$ brew update
$ brew tap caskroom/cask
$ brew install Caskroom/cask/java

And Java 8 will be installed at /Library/Java/JavaVirtualMachines/jdk1.8.xxx.jdk/

Check version:

@nyimbi
nyimbi / elk_stack_install.md
Created May 10, 2018 06:18 — forked from squarism/elk_stack_install.md
Quick Elasticsearch / Kibana / Logstash (ELK stack) Install (for your local mac dev box)

Elasticsearch / Kibana / Logstash Quick Install

Instructions for getting an ELK stack set up quick on Mac. Paths are opinionated. You'll have to infer and change. Sorry mate. 🍰

Install Homebrew if not already. You probably have. If not, you should.

brew install elasticsearch nginx

do yourself a favor and get a better services command than launchctl

@nyimbi
nyimbi / grok_vi.mdown
Created December 7, 2018 19:29 — forked from nifl/grok_vi.mdown
Your problem with Vim is that you don't grok vi.

Answer by Jim Dennis on Stack Overflow question http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118

Your problem with Vim is that you don't grok vi.

You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).

The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a simple statement which is, essentially, an abbreviation for 0 y$:

0 go to the beginning of this line. y yank from here (up to where?)

@nyimbi
nyimbi / replace.sh
Created April 26, 2019 07:22 — forked from hlissner/replace.sh
Bulk search & replace with ag (the_silver_searcher)
# ag <https://github.com/ggreer/the_silver_searcher>
# usage: ag-replace.sh [search] [replace]
# caveats: will choke if either arguments contain a forward slash
# notes: will back up changed files to *.bak files
ag -0 -l $1 | xargs -0 perl -pi.bak -e "s/$1/$2/g"
# or if you prefer sed's regex syntax:
ag -0 -l $1 | xargs -0 sed -ri.bak -e "s/$1/$2/g"
@nyimbi
nyimbi / update-outdated-brew-casks.sh
Created June 5, 2019 23:12 — forked from christopheranderton/update-outdated-brew-casks.sh
Upgrade outdated brew casks. One liner, and the ”official” way to do it without using different hacks or scripts. However, it does not really replace some scripts out there, as in-app updates is not seen by Homebrew.
# Upgrade / Update outdated casks installed.
# --------------------------------------------------------------------------------
# Looks for outdated casks and installs the the latest version.
# User data (like application preferences) is intact.
# --------------------------------------------------------------------------------
brew cask reinstall `brew cask outdated`
# List installed outdated casks
# More info: https://github.com/caskroom/homebrew-cask/issues/29301
@nyimbi
nyimbi / how-to-setup-mac-elasticsearch.md
Created August 23, 2019 09:42 — forked from jpalala/how-to-setup-mac-elasticsearch.md
setting up elasticsearch on your mac with brew

Install va homebrew

If you don't have homebrew installed - get homebrew here

Then run: brew install elasticsearch

Configuration

Update the elasticsearch configuration file in /usr/local/etc/elasticsearch/elasticsearch.yml.

Stevey's Google Platforms Rant

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

@nyimbi
nyimbi / FAASD_MULTIPASS.md
Created February 7, 2020 07:25 — forked from alexellis/FAASD_MULTIPASS.md
FAASD_MULTIPASS.md

Get up and running with your own faasd installation on your Mac

multipass from Canoncial is like Docker Desktop, but for getting Ubuntu instead of a Docker daemon. It works on MacOS, Linux, and Windows with the same consistent UX. It's not fully open-source, and uses some proprietary add-ons / binaries, but is free to use.

For Linux using Ubuntu, you can install the packages directly, or use sudo snap install multipass --classic and follow this tutorial. For Raspberry Pi, see my tutorial here.

John McCabe has also tested faasd on Windows with multipass, see his tweet.

Use-case:

@nyimbi
nyimbi / composing-software.md
Created February 7, 2020 07:37 — forked from Geoff-Ford/composing-software.md
Eric Elliott's Composing Software Series