Skip to content

Instantly share code, notes, and snippets.

View waltervargas's full-sized avatar
🎯
BioHacking(self)

Walter Vargas waltervargas

🎯
BioHacking(self)
View GitHub Profile
@waltervargas
waltervargas / openerp_models.py
Last active August 29, 2015 14:06
openerp_models.py
""" show models
This script run in Debian with openerp 7
For run:
1. su - openerp -s /bin/bash
2. python openerp_models.py
"""
import openerp
from pprint import pprint
@waltervargas
waltervargas / openerp_export_data.py
Created September 21, 2014 01:35
openerp_export_data.py
import openerp
from pprint import pprint
def main():
"""main function"""
dbname = 'connector-file'
model_name = 'res.partner'
cr = openerp.pooler.get_db(dbname).cursor()
pool = openerp.pooler.get_pool(dbname)
@waltervargas
waltervargas / openstack-debian-image.org
Last active August 29, 2015 14:07
Creating Debian Image for OpenStack

Creating Debian Image for OpenStack

  1. Install the package build-openstack-debian-image
    # apt-get install build-openstack-debian-image
        
  2. Generate image.
    # build-openstack-debian-image -r wheezy -u http://192.168.113.76:3142/ftp.debian.org/debian -ar 
        
@waltervargas
waltervargas / create_odoo_user.sh
Created February 18, 2015 06:41
Create a user on Odoo/openerp from curl
curl --data 'login=walter&name=walter&password=test&confirm_password=test' http://192.168.0.103:8069/web/signup -H 'Content-Type: application/x-www-form-urlencoded' -H 'Cookie: instance0|ab=%22c%22; session_id=c763117e73c328eea1affa841d87d7d94d9b7e6d'
@waltervargas
waltervargas / emacs-tip-xml
Created May 15, 2015 23:17
Pretty XML with Emacs
C-u M-| xmllint --format -
@waltervargas
waltervargas / gist:a8f70781ac14073fa307
Created June 7, 2015 07:36
powerline more fast on mac os x
powerline-daemon --kill
python -m cProfile -o /tmp/profile /path/to/powerline-daemon --replace
@waltervargas
waltervargas / aws_credentials.sh
Created June 26, 2015 17:04
Set AWS Credentials
export AWS_ACCESS_KEY_ID=EXAMPLEs234asd897
export AWS_SECRET_ACCESS_KEY=EXAMPLE24324h234sde34de2342de3aeb
export AWS_DEFAULT_REGION=us-west-2
@waltervargas
waltervargas / docker-compose.conf
Last active February 27, 2016 01:04
upstart job to manage docker-compose and copy a .htaccess file when the apache docker container is up and running.
# This job can run docker containers with docker-compose
# and copy a file when one of the dockers is available.
description "Job to manage docker-compose"
author "Walter Vargas <[email protected]> and Juan Mesa <[email protected]>"
start on filesystem and started docker
stop on runlevel [!2345]
respawn
script
/usr/local/bin/docker-compose -f /etc/app/docker-compose.yml up
@waltervargas
waltervargas / init-local.el
Created March 10, 2016 04:03
emacs local personal settings
;;; Code:
(add-to-list 'default-frame-alist
'(font . "Source Code Pro Semibold"))
(require 'flycheck)
(add-hook 'js-mode-hook
(lambda () (flycheck-mode t)))
(setq org-agenda-files (list "~/git/org/tasks.org"
@waltervargas
waltervargas / init-local-jsx.el
Created March 26, 2016 12:11
emacs jsx support in web-mode
(setq web-mode-content-types-alist
'(("jsx" . "\\.js[x]?\\'")))