Skip to content

Instantly share code, notes, and snippets.

View carlessanagustin's full-sized avatar

carles san agustin carlessanagustin

View GitHub Profile
## credit: http://fabian-affolter.ch/blog/the-lineinfile-module-of-ansible/
---
- hosts: alpine_install
user: root
tasks:
# - name: create a complete empty file
# command: /usr/bin/touch /test/test.conf
- name: create a new file with lineinfile
@carlessanagustin
carlessanagustin / VBoxGuestAdditions_Vagrant.md
Last active December 7, 2016 14:50 — forked from fernandoaleman/gist:5083680
VAGRANT: How to update VirtualBox Guest Additions with Vagrant
  • In host machine ($ )
vagrant init centos/7
vagrant up
vagrant ssh
  • In guest machine ([vagrant@localhost ~]$ )
import scrapy
import peewee
import re
import urllib
import cStringIO
from PIL import Image
from playhouse.db_url import connect
db = connect('mysql://root:@127.0.0.1/house')
@carlessanagustin
carlessanagustin / postgres-cheatsheet.md
Created February 29, 2016 09:44 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

If run with -E flag, it will describe the underlaying queries of the \ commands (cool for learning!).

Most \d commands support additional param of __schema__.name__ and accept wildcards like *.*