Skip to content

Instantly share code, notes, and snippets.

@damaya
damaya / rsync ssh key
Created March 4, 2014 15:27
Rsync with ssh key
rsync -azu -e 'ssh -i /<path>/key.pem' user@host:<originpathfile>/{foler|file} <localpath>
@damaya
damaya / 0_reuse_code.js
Created April 1, 2014 22:44
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@damaya
damaya / gist:9948230
Created April 3, 2014 04:21
Vagrant File entorno ubuntu hp
config.vm.box = "hashicorp/precise64"
config.vm.provision :shell, :path => "bootstrap.sh"
config.vm.network :forwarded_port, host: 4567, guest: 80
config.vm.synced_folder "/var/www/projects/symfony/www/app/cache", "/vagrant/symfony/app/cache", :mount_options => ['dmode=777,fmode=777']
config.vm.synced_folder "/var/www/projects/symfony/www/app/logs", "/vagrant/symfony/app/logs", :mount_options => ['dmode=777,fmode=777']
@damaya
damaya / bootstrap.sh
Created April 3, 2014 04:22
Bootstrap sencillo máquina con vagrant
#!/usr/bin/env bash
apt-get update
apt-get install -y apache2
sudo apt-get install -y php5
sudo apt-get install -y libapache2-mod-php5
sudo /etc/init.d/apache2 restart
sudo apt-get install -y curl
curl -sS https://getcomposer.org/installer | php
@damaya
damaya / create database
Created May 2, 2014 22:24
Create database from command
CREATE DATABASE my_database DEFAULT CHARACTER SET latin1 DEFAULT COLLATE latin1_swedish_ci;
CREATE DATABASE my_database DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
@damaya
damaya / AWS Devops Bootsrap
Created June 13, 2014 01:10
Bootstrap AWS Devops Lab
Ansible
$ git clone git://github.com/ansible/ansible.git
$ cd ./ansible
$ source ./hacking/env-setup
Install PIP
$ wget https://bootstrap.pypa.io/get-pip.py
$ python get-pip.py
$ sudo pip install paramiko PyYAML jinja2 httplib2
PlayBooks
@damaya
damaya / gist:1c1b6064ccd6005f5464
Created October 10, 2014 01:35
Override de nodo drupal
theme/node/page--node--8.tpl.php para nodo 8
@damaya
damaya / gist:80bb28e27ac5fbf47437
Created January 22, 2015 16:04
Lista de frameworks y herramientas para aprender
RabbitMQ
http://www.rabbitmq.com/
Redis
http://redis.io/
Mandrill
https://mandrill.com/
Erlang
@damaya
damaya / gist:20f785ddaad226002871
Created May 16, 2015 00:51
Contribuir con validación de environment del ezpublish kernel y justificarlo
*/
public function registerContainerConfiguration( LoaderInterface $loader )
{
$environment = $this->getEnvironment();
$loader->load( __DIR__ . '/config/config_' . $environment . '.yml' );
$configFile = __DIR__ . '/config/ezpublish_' . $environment . '.yml';
if ( !is_file( $configFile ) )
{
$configFile = __DIR__ . '/config/ezpublish_setup.yml';
UPDATE `admin_user` SET `password` = MD5('newpassword') WHERE `username` = 'adminusername';