Skip to content

Instantly share code, notes, and snippets.


Njuguna Gathere, Tirus njugunagathere

View GitHub Profile
njugunagathere /
Created May 19, 2019 — forked from Rajeshr34/
Wkhtmltopdf With Patched QT Setup Ubuntu 16+
cd ~
apt-get install libfontenc1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig -y
#replace arch
dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
apt --fix-broken install
njugunagathere / fetchCoinPrice.scpt
Created Jan 13, 2018 — forked from cmikeb1/fetchCoinPrice.scpt
AppleScript to retrieve crypto currency prices
View fetchCoinPrice.scpt
set coins to {}
-- retrieve the list of coins from number
tell application "Numbers"
tell table 1 of sheet 1 of document 1
set cntRow to count row
set cntCol to count column
njugunagathere /
Created Dec 10, 2017 — forked from olivierlacan/
How to migrate a Homebrew-installed PostgreSQL database to a new major version (9.3 to 9.4) on OS X

This guide assumes that you recently run brew upgrade postgresql and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.

First let's check something.

brew info postgresql

The top of what gets printed as a result is the most important:

njugunagathere / gist:a0717bed641a1e7e1e7412671fe90f00
Created Dec 10, 2017 — forked from giannisp/gist:ebaca117ac9e44231421f04e7796d5ca
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
View gist:a0717bed641a1e7e1e7412671fe90f00
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql
njugunagathere / nginx.conf
Created Oct 5, 2017 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
View subscriptions.opml
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<title>Subscriptions -</title>
<outline text="PHP" title="PHP">
<outline htmlUrl="" title="" xmlUrl="" type="rss" text=""/>
<outline htmlUrl="" title="" xmlUrl="" type="rss" text=""/>
<outline title="" xmlUrl="" type="rss" text=""/>
View serviceworker.js
"use strict";
/* A version number is useful when updating the worker logic,
allowing you to remove outdated cache entries during the update.
var version = 'v1::';
/* These resources will be downloaded and cached by the service worker
during the installation process. If any resource fails to be downloaded,
then the service worker won't be installed either.
View manifest.json
"short_name": "madewithlove",
"name": "madewithlove",
"icons": [
"src": "img/launcher-icon@2x.png",
"sizes": "96x96",
"type": "image/png"
njugunagathere / uuids.php
Created Jun 8, 2017 — forked from renebakx/uuids.php
Laravel 5.4 UUID Trait
View uuids.php
namespace App\Traits;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Ramsey\Uuid\Uuid;
trait Uuids {
View bitbucket-pipelines.yml
image: savjee/docker-s3website-git-ftp-deploy
- step:
- git ftp init --user $FTP_USERNAME --passwd $FTP_PASSWORD
You can’t perform that action at this time.