Skip to content

Instantly share code, notes, and snippets.


keopx keopx

View GitHub Profile
View gist:8569316a0661e41264a3cc9e0c4da961
# perform a fresh install of Ubuntu 17.10
# upgrade the kernel to v4.13.10
mkdir ~/kernel-v4.13.10
cd ~/kernel-v4.13.10
sudo dpkg -i *.deb
keopx / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Created Jan 15, 2018 — forked from whizzzkid/XPS-15 9560 Getting Nvidia To Work on KDE Neon
Making Nvidia Drivers + CUDA 8 + Bumblebee work together on XPS 15 Early 2017 9560 kabylake. Ubuntu, KDE Neon, Linux Mint, debian.
View XPS-15 9560 Getting Nvidia To Work on KDE Neon
# Instructions for 4.13 and cuda 9.0 RC
# If upgrading from 4.11 and cuda 8.0
$ sudo apt-get purge --auto-remove libcud*
$ sudo apt-get purge --auto-remove cuda*
$ sudo apt-get purge --auto-remove nvidia*
# also remove the container directory direcotory at /usr/local/cuda-8.0/
# Install Intel Graphics Patch Firmwares (This should reboot your system):
bash -c "$(curl -fsSL"
keopx / JwtRouteSubscriber.php
Created Dec 2, 2017
Alter routes options and requirements
View JwtRouteSubscriber.php
namespace Drupal\my_module\Routing;
use Drupal\Core\Routing\RouteSubscriberBase;
use Symfony\Component\Routing\RouteCollection;
* Listens to the dynamic route events.
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
# 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) {