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
@irfanbaigse
irfanbaigse / mvnw-fix.sh
Created January 2, 2024 11:04 — forked from kbastani/mvnw-fix.sh
Adds a settings.xml file to your Spring Boot maven wrapper
#!/usr/bin/env bash
# Secure workaround for https://issues.sonatype.org/browse/MVNCENTRAL-1369
# Navigate to the root of your Spring Boot project where a Maven wrapper is present and run this script
cd .mvn/wrapper
wget https://gist.githubusercontent.com/kbastani/d4b4c92969ec5a22681bb3daa4a80343/raw/f166086ef051369383b02dfb74317cd07b6f2c6e/settings.xml
cd ../../
./mvnw clean install -s .mvn/wrapper/settings.xml
# Find add 'node_modules'
find . -name "node_modules" -type d -prune -print | xargs du -chs
# Delete all
find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \;
@irfanbaigse
irfanbaigse / install.sh
Created January 11, 2022 12:40 — forked from aaabramov/install.sh
Installing zsh + oh-my-zsh on Amazon EC2 Amazon Linux 2 AMI. (Prepared in the scope of posting https://aaabramov.medium.com/installing-zsh-oh-my-zsh-on-amazon-ec2-amazon-linux-2-ami-88b5fc83109)
sudo yum update
# Installing ZSH
sudo yum -y install zsh
# Check ZSH has been installed
zsh --version
# Install "util-linux-user" because "chsh" is not available by default
# See https://superuser.com/a/1389273/599050
@irfanbaigse
irfanbaigse / README.md
Created August 30, 2021 20:09 — forked from ngryman/README.md
intellij javascript live templates

intellij javascript live templates

Just a dump of handy live templates I use with IntelliJ. They should also work with WebStorm.

How to

  • Go to settings.
  • Search for live templates.
  • Under the javascript section you should be able to manage your templates.
@irfanbaigse
irfanbaigse / Common-Currency.json
Created January 2, 2020 08:25 — forked from ksafranski/Common-Currency.json
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@irfanbaigse
irfanbaigse / client.js
Created March 19, 2019 13:21 — forked from davidgilbertson/client.js
Node http vs net modules
// This makes two connections, one to a tcp server, one to an http server (both in server.js)
// It fires off a bunch of connections and times the response
// Both send strings.
const net = require(`net`);
const http = require(`http`);
function parseIncomingMessage(res) {
return new Promise((resolve) => {
@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 / 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);
}
[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

#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