Skip to content

Instantly share code, notes, and snippets.

mishbah / gist:b46673e817848d7fae83e14b6a6b631f
Last active Mar 14, 2018 — forked from giannisp/gist:ebaca117ac9e44231421f04e7796d5ca
Upgrade PostgreSQL 9.6.5 to 10.3 using Homebrew (macOS)
View gist:b46673e817848d7fae83e14b6a6b631f
After automatically updating Postgres to 10.3 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.3."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# if default not linked to version 10.3 run this script,otherwise skip
# need to have both 9.6.x and latest 10.3 installed, and keep 10.3 as default
# brew unlink postgresql
# brew install postgresql@9.6
# brew unlink postgresql@9.6
mishbah / .vimrc
Created Dec 28, 2015 — forked from JeffreyWay/.vimrc
My .vimrc file
View .vimrc
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
mishbah / ApiTester.php
Last active Aug 26, 2015 — forked from laracasts/ApiTester.php
Incremental APISs: Refactoring Tests and Traits
View ApiTester.php
use Faker\Factory as Faker;
abstract class ApiTester extends TestCase {
* @var Faker
protected $fake;
mishbah / Gulpfile.js
Last active Aug 29, 2015 — forked from laracasts/Gulpfile.js
PHPSpec auto-testing Gulpfile
View Gulpfile.js
var gulp = require('gulp');
var phpspec = require('gulp-phpspec');
var run = require('gulp-run');
var notify = require('gulp-notify');
gulp.task('test', function() {
.pipe(phpspec('', { notify: true }))
.on('error', notify.onError({
mishbah /
Last active Aug 29, 2015 — forked from hofmannsven/
My simply Git Cheatsheet
View UUID.php
* UUID class
* The following class generates VALID RFC 4122 COMPLIANT
* Universally Unique IDentifiers (UUID) version 3, 4 and 5.
* UUIDs generated validates using OSSP UUID Tool, and output
* for named-based UUIDs are exactly the same. This is a pure
* PHP implementation.
mishbah / node_service
Last active Aug 29, 2015 — forked from charlie-sanders/gist:5271721
Sample script for upstart
View node_service
description "MyApp"
author "MyApp by charlie"
env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
start on runlevel [23]
stop on shutdown
View app.scss
form i.icon.error {
color: $assertive;
form input + i.icon.error {
display: none;
margin-left: 8px;
} + i.icon.error {
View gist:fd1e41afbfb4bedb2ce7
use Illuminate\Support\Collection;
use Illuminate\View\View;
class Navigation {
public function compose(View $view) {
$menu = new Collection;
View global.php
// app/start/global.php
| Application Error Logger
| Here we will configure the error logger setup for the application which