Skip to content

Instantly share code, notes, and snippets.

View irfanbaigse's full-sized avatar
:bowtie:
PHP - Node.js - JAVA - AWS - Flutter - MT5/MT4

Irfan Baig irfanbaigse

:bowtie:
PHP - Node.js - JAVA - AWS - Flutter - MT5/MT4
View GitHub Profile

#MongoDB 3.2.x Logging The main log file is the mongod.log. You can specify the log file location when you are starting the mongod process but if you have installed on Ubuntu from a package then you log file will normally be located in /var/log/mongodb/mongod.log.

You can tail the log file using:

tail -f /var/log/mongodb/mongod.log

From the Mongo shell you can also view the log file using:

show logs

[user]
email = irfan-blackhawk
name = irfan.blackhawk@gmail.com
[alias]
prune = fetch --prune
# Because I constantly forget how to do this
# https://git-scm.com/docs/git-fetch#git-fetch--p
undo = reset --soft HEAD^
# Not quite as common as an amend, but still common
@irfanbaigse
irfanbaigse / php-coding-standards.md
Created April 8, 2017 16:09
PHP Coding Standards

PHP Coding Standards

@irfanbaigse
irfanbaigse / phpstrom-function-doc-auto-comment.txt
Last active April 24, 2017 10:42
PhpStrom auto generate function doc comment
/**
* ${NAME}
*
#if (!$!PARAM_DOC || $!PARAM_DOC != "")
#set( $paramCommentArr = ${PARAM_DOC.split("\n")} )
#foreach( $paramComment in $paramCommentArr )
#set ($index = $paramComment.indexOf("$") + 1)
${paramComment} $paramComment.substring($index)
#end
#end
@irfanbaigse
irfanbaigse / delete-containers-images-docker.sh
Created July 4, 2017 07:28
Remove all container and images in docker to save space
#!/bin/bash
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@irfanbaigse
irfanbaigse / ascii.php
Created August 2, 2017 07:49 — forked from donatj/ascii.php
Damn Simple PHP Ascii Art Generator
#!/usr/bin/php -q
<?php
if(isset($argv[1]) && strlen($argv[1])) {
$file = $argv[1];
}else{
echo 'Please Specify a File';
exit(1);
}
@irfanbaigse
irfanbaigse / open-youtrack-github-branch.sh
Created September 19, 2017 07:47
Open youtrack from command line github branch
function openyt() {
open -a /Applications/Google\ Chrome.app https://youtrack.organisation-name.io/issue/$(current_branch)
}
@irfanbaigse
irfanbaigse / README-Template.md
Created September 26, 2017 19:48 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@irfanbaigse
irfanbaigse / php-token-get-all.php
Created March 31, 2018 12:48
php token get all
<?php
$tokens = token_get_all('<?php echo; ?>');
foreach ($tokens as $token) {
if (is_array($token)) {
echo "Line {$token[2]}: ", token_name($token[0]), " ('{$token[1]}')", PHP_EOL;
}
}
<?php
class Anything {
public function include() {
}
}