Gnome 3 Extensions I Like


I’m a chrome user, so this works out really for me. The easiest way to install gnome extensions is through a chrome extension. If you have that, head over to https://extensions.gnome.org/ to get more extensions.

I really like these:

To manage these extensions – turn them on and off, or change options if they have any – use Gnome Tweak Tool. If you don’t have it, get it with this command:

sudo apt install gnome-tweak-tool

 

Switching to Gnome 3 on Ubuntu

If you are starting fresh, the way to go is to install Ubuntu-Gnome. Ubuntu and Ubuntu-Gnome will be merging anyway. Get that here.

If you are like me – using my ubuntu machine daily and super impatient – you can just install gnome and switch to it from the login screen.

Add PPA’s


sudo add-apt-repository ppa:gnome3-team/gnome3-staging

sudo add-apt-repository ppa:gnome3-team/gnome3

Update


sudo apt update

Go for gnome


sudo apt install gnome gnome-shell

You will be prompted at this point to choose between GDM and LightDM. I chose GDM at first, which I read was fine if Gnome was going to be used solely (sharks don’t look back!). I understood that LightDM is the option to choose if you are going to flip between the two. GDM caused me some graphic driver issues that left me unable to boot. I ended up in recovery and ran the above again, this time choosing LightDM. All good after that.

To get the better looking gnome login screen, run:


sudo update-alternatives --config gdm3.css

Nginx as a Reverse Proxy

/etc/nginx/proxy.conf example:


proxy_redirect          off;
proxy_set_header        Host            $host;
proxy_set_header        X-Real-IP       $remote_addr;
proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size    10m;
client_body_buffer_size 128k;
proxy_connect_timeout   90;
proxy_send_timeout      90;
proxy_read_timeout      90;
proxy_buffers           32 4k;

Then when I have a site that requires being passed to a proxy, the location looks like this:


location / {
                proxy_pass      http://191.168.1.2/;
                include         /etc/nginx/proxy.conf;
        }

Dell M3800 + NVidia Prime + Ubuntu 16.10

I’ve been slumming it with Intel integrated graphics only on my M3800.  It works fine, and the battery life is good, but knowing I had a graphics card in this machine that wasn’t being used didn’t sit well with me.  Previous attempts to install drivers and switchers led to black screens and frustration.  I saw on reddit today that ‘Prime Indicator Plus’ is a thing.  It worked without a hitch.

I installed Prime Indicator Plus while running on Intel graphics.

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt update
sudo apt install prime-indicator-plus

I logged out and back in I was greeted with a red exclamation icon.  This was because in additional drivers it showed me using the X.Org X server – Nouveau display driver.  I couldn’t switch away from the Intel driver using that.

I changed to use the NVIDIA binary driver – version 367.57 from nvidia-367.  Previously, selecting this driver and logging out led to a black screen.  I tried it again, logged out and back in, and I’m now using the battery draining power of NVidia!  I see the NVidia logo when using the NVidia card, and the Intel logo when using the integrated video.

I added this repo: sudo apt-add-repository ppa:xorg-edgers/ppa.  I’m not sure if I needed to, but I figured I’d note that.  I think the nvidia-367 was there before I added it.

 

Ubuntu 16.10 – Broken Icons

I tried out a bunch of icon packs on Ubuntu 16.10.  Eventually, my terminal icon was a question mark no matter what icon pack I applied.  I realized somewhere along the way, I broke it.  I found a bunch of suggested fixes.  This is the one that worked for me:


sudo apt install --reinstall gnome-icon-theme gnome-icon-theme-extras

Ubuntu Bash is Here!

… And it’s worthless on it’s own…unless you love typing.

To install Ubuntu Bash on Windows, first make sure you have the anniversary update for Windows 10. To check, search for “About your PC”. You should be at Version 1607 or better. If that’s all good, go to “Programs and Features”, click “Turn Windows features on or off”, and check “Windows Subsystems for Linux (Beta)”.

After it does it’s thing, search for “Bash on Ubuntu on Windows”. The first time it pops open it will ask you to install it. Do that. It will require a reboot.

Using Ubuntu Bash in CMDer is a much better experience. To do that, click the arrow next to the green plus sign in CMDer and choose “Setup Tasks”. Create a new task with this information:

cmd /k “C:\Windows\System32\bash.exe” -new_console:d:%USERPROFILE%

It should look something like this:

ubuntubash

You can then choose Bash when you open a new console and enjoy copy/pasting.

JSX + Atom + Emmet

To use Emmet in JSX files in Atom, there’s a bit of a manual step.

Atom v1.5.3
Emmet v2.4.3

To get it to work:

  1. Edit => Open your keymap
  2. Add the below snippet
  3. Restart Atom

'atom-text-editor[data-grammar="source js jsx"]:not([mini])': 'tab': 'emmet:expand-abbreviation-with-tab'

CiviCRM on WPEngine

CiviCRM: 4.7.7
Wordpress: 4.5.2
Host: WPEngine

After a normal and successful install, I ran into an issue where core assets (like jquery) were 404ing because of url paths. The solution ended up being adding this to the top of civicrm.settings.php (found in /wp-content/uploads/civicrm).


<?php
global $civicrm_setting;
$civicrm_setting['Directory Preferences']['customTemplateDir'] = '/nas/content/live/mysite/wp-content/civicrm/templates/';
$civicrm_setting['Directory Preferences']['customPHPPathDir'] = '/nas/content/live/mysite/wp-content/civicrm/php/';
$civicrm_setting['Directory Preferences']['extensionsDir'] = '/nas/content/live/mysite/wp-content/civicrm/extensions/';
$civicrm_setting['URL Preferences']['extensionsURL'] = 'http://mysite.wpengine.com/wp-content/civicrm/extensions/';
$civicrm_setting['URL Preferences']['imageUploadURL'] = 'http://mysite.wpengine.com/wp-content/uploads/civicrm/persist/contribute/';
$civicrm_setting['URL Preferences']['userFrameworkResourceURL'] = 'http://mysite.wpengine.com/wp-content/plugins/civicrm/civicrm/';

The source of this answer can be found here

Slack Notifications on Ubuntu 16.04 LTS

Things have been swimming along nicely after upgrading to 16.04 over the weekend. Arriving back in the office on Monday revealed immediately that slack notifications weren’t working right. They were now an alert box that had to be manually closed rather than the growl-type notifications that they used to be. I made sure my slack client was on the latest version, and it was. Googling around revealed that I wasn’t the only one with this problem, and that it seemed to be an Electron issue.

This is what fixed it for me:

– sudo touch /usr/lib/libunity-electron_notification_fix
– restart slack

Using jQuery DataTables with Aurelia

This is assuming you have an Aurelia project set up and just want to add jQuery DataTables.

First, use jspm to grab datatables.


jspm install datatables=npm:datatables

When that’s done, you can start using it on a table in a view/viewmodel.


import $ from 'jquery';
import dataTable from 'datatables';

export class DataTableViewModel { 
  activate() {
      //bind your data here
  }
  attached() {
      $('.js-table').dataTable( {
        "paginate": true,
        "pageLength": 25
      });
  }
}

There might be a better way to do this, but this works for now. I mostly based this on this excellent post about Toastr and Aurelia