See how a minor change to your branch name style can make you a better programmer.
Format: <type>/#<issueNumber>-<alias>
job_name=debug-`date +%Y%m%d%H%M%S` | |
kubectl create job ${job_name} --from cj/myveeva-v118273-app-maint | |
kubectl label pod -l job-name=${job_name} run=debug | |
kubectl wait --for condition=Ready pod -l job-name=${job_name} | |
pod_name=`kubectl get pods -l job-name=${job_name} -o jsonpath='{.items[0].metadata.name}'` | |
echo "installing tools" | |
kubectl exec ${pod_name} -- sh -c "apk -q update; apk -q add bash curl jq openssh rsync vim unzip postgresql-client; pip install -q ipython" |
// 1. Go to https://analytics.twitter.com/ | |
// 2. Keep scrolling till the end until all the stats data is loaded | |
// 3. Right click on the page click on last option "Inspect" a window should open select console from that | |
// 4. copy this entire function | |
function getVal (val) { | |
val=val.replace(/\,/g,''); |
module sentry.io/go/chi-example | |
go 1.13 | |
require ( | |
github.com/getsentry/sentry-go v0.4.0 | |
github.com/go-chi/chi v4.0.3+incompatible | |
) |
multipass from Canoncial is like Docker Desktop, but for Ubuntu and works on MacOS, Linux and Windows.
Use-case:
We can get a Kubernetes cluster with k3s in a very short period of time. We can use this for workshops and building labs, and for R&D, including testing.
After installing mitmproxy run it (just type mitmproxy
) in a terminal session and quit.
This will create the necessaries certificates files at ~/.mitmproxy
.
Extract the certificate to .crt
format:
openssl x509 -in ~/.mitmproxy/mitmproxy-ca.pem -inform PEM -out ca.crt
Trust the certificate into CA:
sudo trust anchor ca.crt
Run the mitmproxy
again
{% extends "base.html" %} | |
{% load static %} | |
{% block title %}{% block head_title %}Knowledgebase - Delete {{ article.name }}{% endblock head_title %}{% endblock title %} | |
{% block content %} | |
<div class="container-fluid"> | |
<div class="row ml-1 mr-1"> | |
<div class="col-md-12"> |
""" | |
Django ORM Optimization Tips | |
Caveats: | |
* Only use optimizations that obfuscate the code if you need to. | |
* Not all of these tips are hard and fast rules. | |
* Use your judgement to determine what improvements are appropriate for your code. | |
""" | |
# --------------------------------------------------------------------------- |
2019 update: this essay has been updated on my personal site, together with a followup on how to get started
2020 update: I'm now writing a book with updated versions of all these essays and 35 other chapters!!!!
If there's a golden rule, it's this one, so I put it first. All the other rules are more or less elaborations of this rule #1.
You already know that you will never be done learning. But most people "learn in private", and lurk. They consume content without creating any themselves. Again, that's fine, but we're here to talk about being in the top quintile. What you do here is to have a habit of creating learning exhaust. Write blogs and tutorials and cheatsheets. Speak at meetups and conferences. Ask and answer things on Stackoverflow or Reddit. (Avoid the walled gardens like Slack and Discourse, they're not public). Make Youtube videos