minikube start \
--driver=virtualbox \
--cpus 4 \
--memory 8192
Recomended: 8 CPU and 30 GB RAM (for demo we are going to use minimal setup)
I've been working with Apache Kafka for over 7 years. I inevitably find myself doing the same set of activities while I'm developing or working with someone else's system. Here's a set of Kafka productivity hacks for doing a few things way faster than you're probably doing them now. 🔥
Fast/efficient approach:
-- execute("UPDATE posts SET comments_count = (SELECT count(1) FROM comments WHERE comments.post_id = posts.id)")
-> 1.3197s
Slow/naïve approach:
def primes(max) | |
nums = Array.new(max + 1, 1) | |
nums[0] = nums[1] = 0 | |
(2..Math.sqrt(max)).each do |sieve| | |
if nums[sieve] == 1 | |
(2 * sieve).step(max, sieve).each do |num| | |
nums[num] = 0 | |
end | |
end |
Here is a list of scopes to use in Sublime Text 2/3 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
FROM ubuntu:trusty | |
MAINTAINER Youssef Kababe "[email protected]" | |
RUN apt-get update | |
RUN apt-get install -y wget | |
RUN apt-get install -y libpcre3-dev | |
RUN apt-get install -y zlib1g-dev | |
RUN apt-get install -y make | |
RUN wget http://nginx.org/download/nginx-1.6.1.tar.gz |
This is a collection of links, examples and rants about Presenters/Decorators in Rails.
The "Decorator" pattern slowly started gaining popularity in Rails several years ago. It is not part of core Rails, and there's many different interpretations about how it should work in practice.
Jay Fields wrote about it in 2007 (before he switched back to Java and then Clojure): http://blog.jayfields.com/2007/03/rails-presenter-pattern.html
Sublime Text includes a command line tool, subl
, to work with files on the command line. This can be used to open files and projects in Sublime Text, as well working as an EDITOR for unix tools, such as git and subversion.
Applications
folderSetup
# 1) Create your private key (any password will do, we remove it below) | |
$ cd ~/.ssh | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |