Skip to content

Instantly share code, notes, and snippets.


keopx keopx

View GitHub Profile
keopx /
Created Nov 2, 2017
drush sql-drop --default-file
drush sql-drop --default-file
keopx /
Created Oct 21, 2017 — forked from spenserlee/
Personal notes for dual booting Windows and Linux on XPS 15 9560

Installing Ubuntu GNOME 17.04 on XPS 15 9560

This document is to serve as a set of notes for myself and can be used as a guide for others looking to set up Ubuntu on their XPS 15. For me this was a dual-boot setup with Windows 10. On Linux I don't have a need for the discrete graphics card, so the main focus is to maximize battery life for development.

I had initially tried to dual boot with Fedora 25, but ran into a lot of issues trying to disable the discrete graphics card, resulting in poor battery life. Instead of starting over with Fedora again, I decided to try with Ubuntu, since there seemed to be a few more resources available.

My XPS Configuration is: i7, 16GB RAM, 512GB SSD, 4K Screen.


keopx /
Created Oct 16, 2017
Drupal - Bash shell script to fix Drupal permissions
help="nHelp: This script is used to fix permissions of a drupal installationnyou need to provide the following arguments:nt 1) Path to your drupal installationnt 2) Username of the user that you want to give files/directories ownershipnNote: "www-data" (apache default) is assumed as the group the server is belonging to, if this is different you need to modify it manually by editing this scriptnnUsage: (sudo) bash ${0##*/} drupal_path user_namen"
if [ -z "${path}" ] || [ ! -d "${path}/sites" ] || [ ! -f "${path}/modules/system/system.module" ]; then
echo "Please provide a valid drupal path"
echo -e $help
keopx / script.pipeline
Created Oct 11, 2017 — forked from juampynr/script.pipeline
Jenkins job to sync Production into Develoment
View script.pipeline
String pro_domain = ''
String dev_domain = ''
String drush_pro = "drush -l ${pro_domain} -r /var/www/${pro_domain}/current/web"
String drush_dev = "drush -l ${dev_domain} -r /var/www/${dev_domain}/current/web"
String files_pro = "/var/www/${pro_domain}/shared/web/sites/default/files/"
String files_dev = "/var/www/${dev_domain}/shared/web/sites/default/files/"
String rsyncOpts = '-azv --delete --exclude .php --exclude php --exclude styles'
String deploySshKeyId = 'some-key-id'
lock(resource: "") {
# Purge all Varnish cache
varnishadm "ban req.url ~ /"
keopx /
Last active Sep 27, 2017
keopx / ImageStyleGenerator.php
Created Sep 1, 2017
Drupal 8 generate image style
View ImageStyleGenerator.php
* Create images with timeline ImageStyle.
protected function createImages() {
$style = ImageStyle::load('timeline');
$style_extra = ImageStyle::load('timeline_extra');
$nodes = $this->getNodes();
foreach ($nodes as $node) {
View apc.php
| APC |
| Copyright (c) 2006-2011 The PHP Group |
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
View varnish.vcl
{% block version -%}
vcl 4.0;
{% endblock %}
# This Varnish VCL has been adapted from the Four Kitchens VCL for Varnish 3.
# Default backend definition. Points to Apache, normally.
backend default {
{% block backend -%}
.host = "{{ varnish_default_backend_host }}";