Skip to content

Instantly share code, notes, and snippets.

@mabroor
mabroor / export-redis-set.sh
Last active June 5, 2024 03:05
Export a redis set to json
redis-cli SMEMBERS myset | jq -R . | jq -s . > myset.json
@mabroor
mabroor / FIX.md
Created December 20, 2020 09:03
pyenv issues on Big Sur

After installing Big Sur, pyenv fails with compile errors as follows:

❯ pyenv install 3.9.0
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.9.0.tar.xz...
-> https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tar.xz
Installing Python-3.9.0...
python-build: use readline from homebrew
@mabroor
mabroor / go-jira.md
Created October 28, 2020 20:01
Getting started with go-jira

Getting Jira on CLI

The instructions on the Go Jira are not so good on how to get started so I have created this guide to get up and running.

For MacOS

brew install go-jira
@mabroor
mabroor / route53.sh
Created March 19, 2020 20:30 — forked from avishayil/route53.sh
Update Route53 Record With Machine IP Address
#!/bin/bash
# (optional) You might need to set your PATH variable at the top here
# depending on how you run this script
# PATH=PATH
# Hosted Zone ID e.g. BJBK35SKMM9OE
ZONEID="ZONEID"
# The CNAME you want to update e.g. hello.example.com
@mabroor
mabroor / README.md
Created February 11, 2020 13:46 — forked from hofmannsven/README.md
Git Cheatsheet
@mabroor
mabroor / docker_debugging.md
Created February 5, 2020 10:06 — forked from veuncent/docker_debugging.md
Debugging Django apps running in Docker using ptvsd - Visual Studio (Code)

Remote debugging in Docker (for Django apps)

In order to enable debugging for your Django app running in a Docker container, follow these steps using Visual Studio (Code):

  1. Add ptvsd to your requirements.txt file
ptvsd == 4.3.2
  1. To your launch.json, add this:
@mabroor
mabroor / Brewfile
Created July 1, 2019 08:40
Brew file to get a basic brew setup for devops
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-fonts"
tap "homebrew/cask-versions"
tap "homebrew/core"
tap "remind101/formulae"
brew "awk"
brew "git"
brew "go"
brew "jq"
@mabroor
mabroor / gprunemerged.sh
Created May 27, 2019 18:47
Git prune squashed and merged branches
alias gprunemerged='git checkout master && comm -12 <(git branch | sed "s/ *//g") <(git remote prune origin | sed "s/^.*origin\///g") | xargs -L1 -J % git branch -D %'
@mabroor
mabroor / .gitlab-ci.yml
Created April 6, 2019 07:14 — forked from jlis/.gitlab-ci.yml
AWS ECS and ECR deployment via Docker and Gitlab CI
image: docker:latest
variables:
REPOSITORY_URL: <AWS ACCOUNT ID>.dkr.ecr.eu-central-1.amazonaws.com/<ECS REPOSITORY NAME>
REGION: eu-central-1
TASK_DEFINTION_NAME: <TASK DEFINITION NAME>
CLUSTER_NAME: <CLUSTER NAME>
SERVICE_NAME: <SERVICE NAME>
services:
@mabroor
mabroor / fix.sh
Created January 3, 2019 10:40
Fix virtualenv after brew upgrade
deactivate
cd ~/.virtualenv/problem_env
rm -rf .Python bin/python* lib/python2.7/* include/python2.7
# Check python path
# which python
virtualenv -p /usr/local/bin/python .