Skip to content

Instantly share code, notes, and snippets.

View nietzscheson's full-sized avatar

Cristian Angulo nietzscheson

View GitHub Profile
@nietzscheson
nietzscheson / gist:a31f001f0bbc08bc07dbe9ae85c7e268
Created October 10, 2016 15:11 — forked from Steven-Rose/gist:3943830
VI: Select all + delete, select all + copy
Select all and delete (actually move to buffer)
:%d
Select all and copy to buffer
:%y
Use p to paste the buffer.
@nietzscheson
nietzscheson / Install-php7.md
Created December 22, 2016 16:03 — forked from hollodotme/Install-php7.md
Installing php7-fpm with phpredis and xdebug extension on Ubuntu 14.04

Install php7.0-fpm

# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
  • Install setfacl in linux:
sudo apt-get install setfacl
  • Set permissions:
$ sudo setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx folder
$ sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx folder
    And I am logged in as an administrator
      no such session
        (Driver info: chromedriver=2.27.440175 (9bc1d90b8bfa4dd181fbbf769a5eb5e575574320),platform=Linux 4.4.0-22-generic x86_64) (WARNING: The server did not provide any stacktrace information)
      Command duration or timeout: 21 milliseconds
      Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
      System info: host: 'homestead', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-22-generic', java.version: '1.8.0_121'
      Driver info: org.openqa.selenium.chrome.ChromeDriver
      Capabilities [{message=unknown error: Chrome failed to start: exited abnormally
 (Driver info: chromedriver=2.27.440175 (9bc1d90b8bfa4dd181fbbf769a5eb5e575574320),platform=Linux 4.4.0-22-generic x86_64), platform=ANY}]
{
"name": "cristianangulo.com",
"version": "0.0.1",
"dependencies": {
"jquery": "3.2.0",
"bootstrap": "3.3.7",
"loaders.css": "0.1.2",
//"chartist": "*",
//"pace" : "*",
//"spin" : "*",
@nietzscheson
nietzscheson / Customer.md
Last active March 23, 2017 23:22
[Conekta] - Pagos con Tarjeta

Crea un customer

$customer = \Conekta\Customer::create(array(
            'name'  => "Mario Perez",
            'email' => "usuario@example.com",
            'phone' => "+5215555555555",
            'corporate' => true,
            'payment_sources' => array(array(
                'token_id' => "tok_test_visa_4242",
                'type' => "card"
@nietzscheson
nietzscheson / install.sh
Created September 6, 2017 16:22 — forked from ziadoz/install.sh
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
version: '2'
services:
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
environment:
- PMA_ARBITRARY=1
restart: always
ports:
@nietzscheson
nietzscheson / default.conf
Created January 11, 2018 15:54
Default server configuration with Nginx
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@nietzscheson
nietzscheson / ansible-commands.txt
Last active January 12, 2018 16:58
Personal Ansible commands
- ansible -i inventories [hosts] -m ping -[v][vv][vvv]
- ansible-playbook playbook.yml -i inventories
- ansible-playbook playbook.yml --start-at-task="[task label]"