Skip to content

Instantly share code, notes, and snippets.

View njugunagathere's full-sized avatar

Njuguna Gathere, Tirus njugunagathere

View GitHub Profile
@njugunagathere
njugunagathere / .jsbeautifyrc
Created May 5, 2017 09:27 — forked from wzup/.jsbeautifyrc
.jsbeautifyrc file example
{
// The plugin looks for a .jsbeautifyrc file in the same directory as the
// source file you're prettifying (or any directory above if it doesn't exist,
// or in your home folder if everything else fails) and uses those options
// along the default ones.
// Details: https://github.com/victorporof/Sublime-HTMLPrettify#using-your-own-jsbeautifyrc-options
// Documentation: https://github.com/einars/js-beautify/
"html": {
"allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg", "dust"],
@njugunagathere
njugunagathere / bitbucket-pipelines.yml
Created May 20, 2017 20:41 — forked from mvaneijgen/bitbucket-pipelines.yml
Roots/sage compile and push to remote server via git ftp
# This is a sample build configuration for PHP.
# Check our guides at https://confluence.atlassian.com/x/VYk8Lw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
pipelines:
branches:
stage:
- step:
script:
# You can specify a custom docker image from Docker Hub as your build environment.
image: samueldebruyn/debian-git
pipelines:
default:
- step:
script:
- apt-get update
- apt-get -qq install git-ftp
- git ftp init --user $FTP_USERNAME --passwd $FTP_PASSWORD ftp://youtftpsite.com/ftp-path/
# for the second push run this command instead of init
@njugunagathere
njugunagathere / bitbucket-pipelines.yml
Created May 20, 2017 20:45 — forked from davidperezgar/bitbucket-pipelines.yml
Bitbucket Pipelines YML to FTP
image: savjee/docker-s3website-git-ftp-deploy
pipelines:
default:
- step:
script:
- git ftp init --user $FTP_USERNAME --passwd $FTP_PASSWORD ftp://s1.closemarketing.net/domains/domain.com/public_html/
@njugunagathere
njugunagathere / uuids.php
Created June 8, 2017 09:10 — forked from renebakx/uuids.php
Laravel 5.4 UUID Trait
<?php
namespace App\Traits;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Ramsey\Uuid\Uuid;
trait Uuids {
{
"short_name": "madewithlove",
"name": "madewithlove",
"icons": [
{
"src": "img/launcher-icon@2x.png",
"sizes": "96x96",
"type": "image/png"
},
{
"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.
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Subscriptions - freek@spatie.be</title>
</head>
<body>
<outline text="PHP" title="PHP">
<outline htmlUrl="http://frederickvanbrabant.com" title="frederickvanbrabant.com" xmlUrl="http://frederickvanbrabant.com/feed.xml" type="rss" text="frederickvanbrabant.com"/>
<outline htmlUrl="http://mattallan.org" title="mattallan.org" xmlUrl="http://mattallan.org/feed.xml" type="rss" text="mattallan.org"/>
<outline title="asked.io" xmlUrl="https://asked.io/rss" type="rss" text="asked.io"/>
@njugunagathere
njugunagathere / nginx.conf
Created October 5, 2017 19:54 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@njugunagathere
njugunagathere / gist:a0717bed641a1e7e1e7412671fe90f00
Created December 10, 2017 05:00 — forked from giannisp/gist:ebaca117ac9e44231421f04e7796d5ca
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
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