Skip to content

Instantly share code, notes, and snippets.

View nathanielvarona's full-sized avatar

Nathaniel Varona nathanielvarona

View GitHub Profile
@nathanielvarona
nathanielvarona / README.md
Created January 16, 2024 01:45 — forked from ifnull/README.md
Supervisor + Ngrok
apt-get install supervisor ngrok

Create the config files

  • /root/.ngrok2/ngrok.yml
  • /etc/supervisor/conf.d/ngrok.conf
supervisorctl reread

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@nathanielvarona
nathanielvarona / airflow-scheduler-health.service
Last active January 13, 2024 06:32
Airflow Scheduler Health Checks and Auto Restart Scheduler if Unhealthy
# /etc/systemd/system/airflow-scheduler-health.service
# Description: A simple SystemD process manager that execute the health check scripts.
# To monitor: `sudo journalctl -u airflow-scheduler-health -f`
# To investigate unhealthy periods: `tail -f /var/log/airflow/scheduler/unhealthy-periods.log`
[Unit]
Description=Airflow Scheduler Health Checks
[Service]
User=user
Group=group

Keybase proof

I hereby claim:

  • I am nathanielvarona on github.
  • I am nathanielvarona (https://keybase.io/nathanielvarona) on keybase.
  • I have a public key ASAC8Z9M3eeghQyr6U8nR6Wpy6F0Tgmt-rruUo98Lf8V-Qo

To claim this, I am signing this object:

@nathanielvarona
nathanielvarona / delete_git_submodule.md
Created November 12, 2018 07:00 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@nathanielvarona
nathanielvarona / migrate-redis.py
Created October 10, 2018 14:04 — forked from thomasst/migrate-redis.py
Migrate Redis data on Amazon ElastiCache
"""
Copies all keys from the source Redis host to the destination Redis host.
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are
restricted (e.g. on Amazon ElastiCache).
The script scans through the keyspace of the given database number and uses
a pipeline of DUMP and RESTORE commands to migrate the keys.
Requires Redis 2.8.0 or higher.
@nathanielvarona
nathanielvarona / deployment.yml
Created August 10, 2018 03:27 — forked from troyharvey/deployment.yml
Using Kubernetes envFrom for environment variables
# Use envFrom to load Secrets and ConfigMaps into environment variables
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: mans-not-hot
labels:
app: mans-not-hot
spec:
replicas: 1
@nathanielvarona
nathanielvarona / kubectl.md
Created August 5, 2018 12:00 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
"""
Code that goes along with the Airflow tutorial located at:
https://github.com/airbnb/airflow/blob/master/airflow/example_dags/tutorial.py
"""
from airflow import DAG
from airflow.operators.python_operator import PythonOperator
from airflow.operators.generic_transfer import GenericTransfer
from airflow.contrib.hooks import FTPHook
from airflow.hooks.mysql_hook import MySqlHook
@nathanielvarona
nathanielvarona / Dockerfile
Created June 10, 2018 02:59 — forked from sebradloff/Dockerfile
Setup for remote logs s3, airflow 1.9.0
# Showing the necessary part of adding the logging config to the python path
COPY config/log_config.py config/log_config.py
COPY config/__init__.py config/__init__.py
RUN chown -R airflow: ${AIRFLOW_HOME}
ENV PYTHONPATH ${PYTHONPATH}:/usr/lib/python2.7/site-packages/:${AIRFLOW_HOME}/config/