Skip to content

Instantly share code, notes, and snippets.

View my service on linux
mysql mongod teamviewerd mssql-server nginx redis-server postgresql
# how to enable, disable, start, stop, and status
sudo systemctl enable <name_of_service>
sudo systemctl start <name_of_service>
sudo systemctl status <name_of_service>
sudo systemctl stop <name_of_service>
sudo systemctl disable <name_of_service>
@mishbah
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
mishbah / php-gettersetter.sublime-snippet
Created Sep 1, 2016
Snippet for php getter and setter for sublimetext (tested at sublimetext v3)
View php-gettersetter.sublime-snippet
<snippet>
<content><![CDATA[/**
* Getter for ${1:$SELECTION}
*
* @return ${2:mixed}
*/
public function get${1/^(\w)|(?:_(\w))|(?:_)/(?1\u$1:)(?2\u$2:)/g}()
{
return \$this->$1;
}
View embuh.php
$sepatuVarian = [
'KTK001',
'KTK002',
'KTK003',
'KTK004',
'KTK005',
'KTK006'
];
$varians = [
@mishbah
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
View BankIndonesia.csv
Kode Nama Lengkap
002 PT. BANK RAKYAT INDONESIA (PERSERO), Tbk
008 PT. BANK MANDIRI (PERSERO), Tbk
009 PT. BANK NEGARA INDONESIA (PERSERO),Tbk
011 PT. BANK DANAMON INDONESIA, Tbk
013 PT. BANK PERMATA, Tbk (d/h PT BANK BALI Tbk)
014 PT. BANK CENTRAL ASIA, Tbk.
016 PT. BANK INTERNASIONAL INDONESIA, Tbk
019 PT. PAN INDONESIA BANK, Tbk
022 PT. BANK CIMB NIAGA, Tbk d/h NIAGA
@mishbah
mishbah / ApiTester.php
Last active Aug 26, 2015 — forked from laracasts/ApiTester.php
Incremental APISs: Refactoring Tests and Traits
View ApiTester.php
<?php
use Faker\Factory as Faker;
abstract class ApiTester extends TestCase {
/**
* @var Faker
*/
protected $fake;
@mishbah
mishbah / Gulpfile.js
Created Aug 21, 2015
Gulpfile for TDD
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(){
run('clear', {'usePowerShell': true}).exec('Vinyl', function(){
gulp.src('spec/**/*.php')
.pipe(phpspec('', { notify: true}))
.on('error', notify.onError({
@mishbah
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() {
gulp.src('spec/**/*.php')
.pipe(run('clear'))
.pipe(phpspec('', { notify: true }))
.on('error', notify.onError({
@mishbah
mishbah / README.md
Last active Aug 29, 2015 — forked from hofmannsven/README.md
My simply Git Cheatsheet