Skip to content

Instantly share code, notes, and snippets.

View fespino's full-sized avatar
馃

Francisco Espino fespino

馃
View GitHub Profile
@fespino
fespino / py3.3_ubu12.04_x86_64.md
Last active December 17, 2015 20:09
Python 3.3 installation in Ubuntu 12.04 x86_64

Python 3.3 install in Ubuntu 12.04 x86_64

I had some troubles using Python 3.3 in Ubuntu running on x86_64 architecture. This gist is just a reminder of how I solved it.

Getting the source

  1. Get the source: wget http://python.org/ftp/python/3.3.0/Python-3.3.0.tar.bz2
  2. Untar it: tar jxf ./Python-3.3.0.tar.bz2
  3. cd Python-3.3.0
@fespino
fespino / README.md
Last active August 29, 2015 14:03 — forked from jsuwo/BankAccount.java

Continuous Integration with Jenkins on Amazon EC2

Videos

Initial Setup

Fixing Locales in Ubuntu 13.04 on Amazon EC2

# Python Tips and Tricks
## Set union and intersection
```python
>>> set("abcd") & set("cdef")
set(['c', 'd'])
>>> set("abcd") | set("cdef")
set(['a', 'c', 'b', 'e', 'd', 'f'])
```
@fespino
fespino / Python CI Docker Gitlab.md
Last active October 25, 2017 23:22
Python CI with Gitlab
import pika
import pruebas.controller
class BlockingConnectionAdapter(object):
def __init__(self, controller, queue='test'):
self.controller = controller
self.connection = pika.BlockingConnection()
self.channel = self.connection.channel()
self.queue = self.channel.queue_declare(queue=queue, durable=True, exclusive=False, auto_delete=False)
# -*- coding: utf-8 -*-
import kombu
import kombu.mixins
import kombu.common
import transactional.controller
class Worker(kombu.mixins.ConsumerMixin):
def __init__(self, connection, controller, queues):
self.connection = connection
[core]
autocrlf = input
excludesfile = ~/.gitignore_global
[user]
name = nobody
email = nobody@example.com
[color]
diff = auto
status = auto
branch = auto

Local DevelVM to Work VM to remote Devel0

Habilitar la conexi贸n entre de Toy a Work en FirewallVM

Siendo A DevelVM y B WorkVM.

En FirewallVM:

sudo iptables -I FORWARD 2 -s  -d  -j ACCEPT

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@fespino
fespino / mysql-docker.sh
Created April 15, 2018 13:12 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE