Skip to content

Instantly share code, notes, and snippets.

View Amarlanda's full-sized avatar
💭
busy at the moment, please email AL@AmarLanda.com.

Amar Landa Amarlanda

💭
busy at the moment, please email AL@AmarLanda.com.
View GitHub Profile
@Amarlanda
Amarlanda / quotes.csv
Last active November 9, 2022 01:40 — forked from JakubPetriska/quotes.csv
Motivational quotes
Author Quote
Thomas Edison Genius is one percent inspiration and ninety-nine percent perspiration.
Yogi Berra You can observe a lot just by watching.
Abraham Lincoln A house divided against itself cannot stand.
Johann Wolfgang von Goethe Difficulties increase the nearer we get to the goal.
Byron Pulsifer Fate is in your hands and no one elses
Lao Tzu Be the chief but never the lord.
Carl Sandburg Nothing happens unless first we dream.
Aristotle Well begun is half done.
Yogi Berra Life is a learning experience, only if you learn.
chris@opteron:~$ ls -la | awk '{ print $1 $9 }'
total
drwx------.
drwxr-xr-x..
drwx------.aptitude
-rw-------.bash_history
-rw-r--r--.bash_logout
-rw-r--r--.bashrc
drwx------.config
drwxr-xr-x.flexget
@Amarlanda
Amarlanda / fight
Created September 6, 2022 07:48 — forked from dexterous/fight
aws vs sed
#!/bin/bash
echo "Here's what we're parsing"
cat -T input
echo ''
echo "First, we try awk and then cut"
echo ''
set -o xtrace

Why we dropped Lerna from PouchDB

We dropped Lerna from our monorepo architecture in PouchDB 6.0.0. I got a question about this from @reconbot, so I thought I'd explain our reasoning.

First off, I don't want this post to be read as "Lerna sucks, don't use Lerna." We started out using Lerna, but eventually outgrew it because we wrote our own custom thing. Lerna is still a great idea if you're getting started with monorepos (monorepi?).

Backstory:

#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
CNCF_GCP_ORG=758905017065
echo "# Auditing CNCF CGP Org: ${CNCF_GCP_ORG}"
echo "## Iterating over Projects"
@Amarlanda
Amarlanda / check.py
Created June 7, 2022 07:55 — forked from bmoussaud/check.py
JIRA XLDepoy check and update transition request
import sys
import base64
import httplib
import json
from urlparse import urlparse
class JiraCommunicator:
""" Jira Communicator using REST API """
def __init__(self, endpoint='http://localhost:4516', username='admin', password='admin', apiVersion='latest'):
@Amarlanda
Amarlanda / ReadMe.md
Created May 19, 2022 14:44 — forked from startupsandcode/ReadMe.md
Kubernetes on GKE with Nginx

Kubernetes Configuration

I have included a .env, ingress-nginx.yaml, controller-nginx.yaml, and bash script that will build your cluster and deploys everything in your folder you specifify in the parameter for the bash script parameters

To deploy from your cloud-config/staging folder and create the cluster do this:

./deploy.sh staging y

If you want to upgrade your existing app deployment, simply remove the y

@Amarlanda
Amarlanda / make_audiobook.py
Created May 16, 2022 20:25 — forked from madebyollin/make_audiobook.py
Converts an epub or text file to audiobook via Google Cloud TTS
#!/usr/bin/env python3
"""
To use:
1. install/set-up the google cloud api and dependencies listed on https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/texttospeech/cloud-client
2. install pandoc and pypandoc, also tqdm
3. create and download a service_account.json ("Service account key") from https://console.cloud.google.com/apis/credentials
4. run GOOGLE_APPLICATION_CREDENTIALS=service_account.json python make_audiobook.py book_name.epub
"""
import re
import sys

Vim Script for Python Developers

A guide to Vim Script development for Python developers. Sample code for the various expressions, statements, functions and programming constructs is shown in both Python and Vim Script. This is not intended to be a tutorial for developing Vim scripts. It is assumed that the reader is familiar with Python programming.

For an introduction to Vim Script development, refer to usr_41.txt, eval.txt and Learn Vimscript the Hard Way

For a guide similar to this one for JavaScript developers, refer to Vim Script for the JavaScripter

This guide only describes the programming constructs that are present in both Python and Vim. The constructs that are unique to Vim (e.g. autocommands, key-mapping,

@Amarlanda
Amarlanda / kubectl-cka-exams.sh
Created April 27, 2022 00:25 — forked from MartinLuksik/certs
[Kubectl] Kubectl #kubectl #k8s
## 1:
# Count the Number of Nodes That Are Ready to Run Normal Workloads
k get nodes -o=custom-columns='NAME:.metadata.name, TAINTS:.spec.taints[*]'
# Retrieve Error Messages from a Container Log
k logs data-handler -n backend | grep ERROR > /k8s/0002/errors.txt
# Find the pod with a label of app=auth in the web namespace that Is utilizing the most CPU.
k top pods -n web --selector=app=auth --sort-by=cpu
## 2:
# Edit the Web Frontend Deployment to Expose the HTTP Port