Skip to content

Instantly share code, notes, and snippets.

View franckweb's full-sized avatar

Franck Mercado franckweb

  • Globant
  • Cusco, Perú
View GitHub Profile
FROM php:7.0.4-fpm
RUN apt-get update && apt-get install -y libmcrypt-dev \
mysql-client libmagickwand-dev --no-install-recommends \
&& pecl install imagick \
&& docker-php-ext-enable imagick \
&& docker-php-ext-install mcrypt pdo_mysql
@franckweb
franckweb / install.sh
Created September 20, 2017 16:49 — 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`
@franckweb
franckweb / lxde-rc.xml
Created October 8, 2017 03:11
LXDE configuration shortcuts file
<?xml version="1.0" encoding="UTF-8"?>
<!-- Do not edit this file, it will be overwritten on install.
Copy the file to $HOME/.config/openbox/ instead. -->
<openbox_config xmlns="http://openbox.org/3.4/rc">
<resistance>
<strength>10</strength>
<screen_edge_strength>20</screen_edge_strength>
</resistance>
<focus>
<focusNew>yes</focusNew>
@franckweb
franckweb / docker-compose.yml
Last active October 27, 2017 21:18
Selenium Grid in Docker compose file with WebDriver for Firefox and Chrome
version: '2'
services:
seleniumhub:
container_name: seleniumhub
image: selenium/hub
ports:
- "4444:4444"
@franckweb
franckweb / polylang_stuff.php
Last active January 21, 2019 02:45
Polylang
<?php
/* language switcher */
$translations = pll_the_languages( array(
'show_flags' => 0,
'hide_if_no_translation' => 1,
'hide_current'=> 1,
'raw' => 1)
);
if (count($translations) > 0){
@franckweb
franckweb / linux-commands.md
Last active January 4, 2024 17:03
Useful commands

stop/start snap constant updates

snap refresh --hold snap refresh --unhold

copy files with specific extension to new directory

find . -name *.php -exec cp {} newDirectory ;

rsync

rsync -vzcrSLhp --exclude="deploy.sh" ./ deploy-ex:/var/www/site

@franckweb
franckweb / git-commands.sh
Last active April 12, 2023 15:48
Git commands
## zsh git aliases
https://github.com/ohmyzsh/ohmyzsh/wiki/Cheatsheet
## stash files for later
# add files to stash
git stash push -m "mystash"
# use specific stash
# use by number (n)
@franckweb
franckweb / helpful-scripts.sh
Last active November 20, 2018 03:20
Helpful scripts
## VIM usage
# to delete all lines in a file
:1,$d
## SUBLIME Tabs
{ "keys": "ctrl+pagedown", "command": "next_view_in_stack" },
{ "keys": "ctrl+pageup", "command": "prev_view_in_stack" },
{ "keys": ["ctrl+tab"], "command": "next_view" },
@franckweb
franckweb / sql-queries.sql
Last active December 14, 2017 16:42
SQL Queries
## EXPLAIN SQL function
# https://dev.mysql.com/doc/refman/5.7/en/using-explain.html
# https://www.sitepoint.com/using-explain-to-write-better-mysql-queries/
@franckweb
franckweb / docker-commands.sh
Last active March 21, 2023 02:32
Docker commands
## Add current logged in linux user to docker group
1. sudo usermod -aG docker ${USER}
# To apply the new group membership, log out of the server and back in, or type the following:
2. su - ${USER}
# You will be prompted to enter your user’s password to continue.
# Confirm that your user is now added to the docker group by typing:
3. groups