Skip to content

Instantly share code, notes, and snippets.

View nathanielvarona's full-sized avatar

Nathaniel Varona nathanielvarona

View GitHub Profile
@nathanielvarona
nathanielvarona / 01_durianpy_meetup_3.sh
Last active October 18, 2015 09:45
DurianPy[3] IaaS and Paravirtualization | Application Deployment with DigitalOcean http://bit.ly/1VYN87j
# Adding a User and Assign a System Level Privileges
sudo adduser ubuntu
sudo adduser ubuntu sudo
sudo nano /etc/sudoers
# or
sudo /usr/sbin/visudo
# Then change the following
# %sudo ALL=(ALL:ALL) NOPASSWD: ALL
@nathanielvarona
nathanielvarona / sendy.nginxconf
Last active May 23, 2019 20:41
Sendy NGINX Configuration works with Sendy 2 and NGINX 1.8 https://sendy.co/
server {
#listen 80;
#listen [::]:80;
server_name sub.domain.tld;
access_log /var/log/sendy/nginx.access.log;
error_log /var/log/sendy/nginx.error.log;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.npmjs.mehserve</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-i</string>
@nathanielvarona
nathanielvarona / SOFFICE_LISTENER_STARTUP_SCRIPTS.md
Last active October 27, 2015 06:44
Collection of startup scripts for headless OpenOffice/LibreOffice soffice listener server. https://github.com/dagwieers/unoconv#conversion-problems

sofficelistener

Collection of startup scripts for headless OpenOffice/LibreOffice soffice listener server

Installation

For SysV Generic Startup Script

$ sudo -s
The primary goal is to swap command and option.
The secondary goal is to remap Caps Lock to Control.
The tertiary goal is to share modifier keys across keyboards, so you can emacs with two keyboards.
The following instructions are good as of 2016-08-24, for OS X El Capitan 10.11.6.
Mac OS Sierra broke Seil support; Seil instructs us to consider Karabiner Elements.
But when Karabiner Elements swaps command and option, it does it for all keyboards;
meaning the native keyboard also gets its command and option swapped, which is bad!
@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/
"""
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 / 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
@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 / 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.