This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
seleniumhub: | |
container_name: seleniumhub | |
image: selenium/hub | |
ports: | |
- "4444:4444" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# VIM PLUGINS | |
## Install Pathogen (vim plugins manager) | |
mkdir -p ~/.vim/autoload ~/.vim/bundle; | |
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim | |
## Create ~/.vimrc and add these contents | |
" contents of minimal .vimrc | |
execute pathogen#infect() | |
syntax on | |
filetype plugin indent on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Personalized sorting options | |
*/ | |
add_filter( 'woocommerce_get_catalog_ordering_args', 'custom_woocommerce_get_catalog_ordering_args' ); | |
function custom_woocommerce_get_catalog_ordering_args( $args ) { | |
$orderby_value = isset( $_GET['orderby'] ) ? woocommerce_clean( $_GET['orderby'] ) : apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) ); | |
$fallback = apply_filters( 'wc_extra_sorting_options_fallback', 'title', $orderby_value ); | |
$fallback_order = apply_filters( 'wc_extra_sorting_options_fallback_order', 'ASC', $orderby_value ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Move non-Virtualmin accounts into Virtualmin transferring data and databases | |
# When its done update config files | |
# TODO: automate the updating of common config files | |
# Connects to the destination server to create the Virtualmin server | |
#Then connects to the source to move files and databases across | |
set -e | |
# New Site Settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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" }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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){ |
OlderNewer