Skip to content

Instantly share code, notes, and snippets.

Pablo Acuña pacuna

View GitHub Profile
View jupyter_node_anaconda_install.sh
#!/usr/bin/env bash
cd /tmp
apt-get update
export ANACONDA_LOCATION="anaconda3"
export ANACONDA_FILE="Anaconda3-5.3.1-Linux-x86_64.sh"
export ANACONDA_URL="https://repo.anaconda.com/archive/"
export ANACONDA_HOME=/usr/$ANACONDA_LOCATION
View script.sh
set -x
echo 'export PATH="/opt/conda/bin:$PATH"' >> ~/.bashrc
sudo apt-get update --fix-missing && sudo apt-get install -y wget bzip2 ca-certificates \
libglib2.0-0 libxext6 libsm6 libxrender1 git
wget --quiet https://repo.anaconda.com/archive/Anaconda3-2018.12-Linux-x86_64.sh -O ~/anaconda.sh && \
sudo /bin/bash ~/anaconda.sh -b -p /opt/conda && \
rm ~/anaconda.sh && \
sudo ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
View docker-compose.yml
version: '3'
volumes:
postgres_data:
driver: local
services:
postgres:
image: postgres
volumes:
View karabiner_pok3r.json
{
"title": "Use CAPS LOCK for pok3r navigation",
"rules": [{
"description": "CAPS LOCK + ijkl to arrow keys",
"manipulators": [{
"type": "basic",
"from": {
"key_code": "k",
"modifiers": {
"optional": [
@pacuna
pacuna / mbox-to-csv.py
Created Apr 2, 2018 — forked from davidpelayo/mbox-to-csv.py
Simple mbox parser to csv in Python
View mbox-to-csv.py
import mailbox
import csv
writer = csv.writer(open("mbox-output.csv", "wb"))
for message in mailbox.mbox('file.mbox/mbox'):
writer.writerow([message['message-id'], message['subject'], message['from']])
View execpod
function execpod(){
kubectl exec -it $(kubectl get pods | grep -m1 $1 | grep -o '^\s*\S\+') /bin/bash
}
View study
- Leer guía Rails testing http://guides.rubyonrails.org/testing.html#rails-sets-up-for-testing-from-the-word-go
- Leer documentación Rspec (http://rspec.info/)
- Leer documentación rspec-rails https://github.com/rspec/rspec-rails
Entender para que sirve Factory Girl y capybara:
- https://github.com/thoughtbot/factory_girl
- https://github.com/teamcapybara/capybara
View why-i'm-leaving-kubernetes-for-swarm.md

I have been an aggressive Kubernetes evangelist over the last few years. It has been the hammer with which I have approached almost all my deployments, and the one tool I have mentioned (shoved down clients throats) in almost all my foremost communications with clients, and it was my go to choice when I was mocking my first startup (saharacluster.com).

A few weeks ago Docker 1.13 was released and I was tasked with replicating a client's Kubernetes deployment on Swarm, more specifically testing running compose on Swarm.

And it was a dream!

All our apps were already dockerised and all I had to do was make a few modificatons to an existing compose file that I had used for testing before prior said deployment on Kubernetes.

And, with the ease with which I was able to expose our endpoints, manage volumes, handle networking, deploy and tear down the setup. I in all honesty see no reason to not use Swarm. No mission-critical feature, or incredibly convenient really nice to have feature in Kubernetes that I'm go

View kubernetes dockerhub
DOCKER_REGISTRY_SERVER=https://index.docker.io/v1/
DOCKER_USER=Type your dockerhub username, same as when you `docker login`
DOCKER_EMAIL=Type your dockerhub email, same as when you `docker login`
DOCKER_PASSWORD=Type your dockerhub pw, same as when you `docker login`
kubectl create secret docker-registry myregistrykey \
--docker-server=$DOCKER_REGISTRY_SERVER \
--docker-username=$DOCKER_USER \
--docker-password=$DOCKER_PASSWORD \
--docker-email=$DOCKER_EMAIL
@pacuna
pacuna / gist:801d594051967542139a6f3b9a4fd7e2
Created Feb 28, 2017
Install Vim 8 with Python, Python 3, Ruby and Lua support on Ubuntu 16.04
View gist:801d594051967542139a6f3b9a4fd7e2
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev python3-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
#Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt-get install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
cd ~
You can’t perform that action at this time.