Skip to content

Instantly share code, notes, and snippets.

View saniyathossain's full-sized avatar

Saniyat Hossain saniyathossain

View GitHub Profile
@saniyathossain
saniyathossain / solved.txt
Created November 22, 2020 04:27
VSC unable to watch for file changes in this large workspace Linux
REFERENCE:
https://stackoverflow.com/questions/50901127/vsc-unable-to-watch-for-file-changes-in-this-large-workspace-weird
Open a new terminal.
cat /proc/sys/fs/inotify/max_user_watches (might be a number 8k+)
now (a) for vim-Editor
(a) sudo vim /etc/sysctl.conf
(a) go all the way down and add a new line with: fs.inotify.max_user_watches=524288 (make sure you DONT have a # in front of the command)
(a) type :wq! and press enter
@saniyathossain
saniyathossain / vim.txt
Created November 21, 2020 08:11
Vim Necessary Commands
:set paste -> copy as is
:set nopaste -> paste mode off
:set nu -> line number show
:set nonu -> no line number
@saniyathossain
saniyathossain / scholars-list.txt
Created November 11, 2020 16:04
Islamic Pages, Apps References
Foreigners:
Ahmed Deedat (Late)
Dr. Zakir Naik
Mufti Menk
Nauman Ali Khan
Omar Suleiman
Bilal Phillips
Yusuf Estes
Abdur Raheem Green
@saniyathossain
saniyathossain / main.go
Created October 25, 2020 18:43 — forked from retgits/main.go
Get the current date in Go
// Original source: https://gistpages.com/posts/go-lang-get-current-date
// Go playground: https://play.golang.org/p/gBO8rdKI6UF
// time.Format should use the layout, Mon Jan 2 15:04:05 MST 2006 to show the pattern
package main
import (
"fmt"
"time"
)
@saniyathossain
saniyathossain / note.txt
Created October 17, 2020 06:08
Install MAC OSX Fonts On Ubuntu
https://securitronlinux.com/debian-testing/install-mac-osx-fonts-on-linux-easily/
sudo update-locale LC_CTYPE=en_US.UTF-8;
sudo update-locale LC_NUMERIC=en_US.UTF-8;
sudo update-locale LC_TIME=en_US.UTF-8;
sudo update-locale LC_COLLATE=en_US.UTF-8
sudo update-locale LC_MONETARY=en_US.UTF-8;
sudo update-locale LC_MESSAGES=en_US.UTF-8
sudo update-locale LC_PAPER=en_US.UTF-8;
sudo update-locale LC_NAME=en_US.UTF-8;
sudo update-locale LC_ADDRESS=en_US.UTF-8;
sudo update-locale LC_TELEPHONE=en_US.UTF-8;
Can I Remove MySQL Binary Log Yes, as long as the data is replicated to Slave server, it’s safe to remove the file. It’s recommend only remove MySQL Binary Log older than 1 month.
Besides, if Recovery of data is the main concern, it’s recommend to archive MySQL Binary Log.
There are several ways to remove or clean up MySQL Binary Log, it’s not recommend to clean up the file manually, manually means running the remove command.
Remove MySQL Binary Log with RESET MASTER Statement Reset Master statement is uses for new database start up during replication for Master and Slave server. This statement can be used to remove all Binary Log.
To clean up Binary Log on Master Server
@saniyathossain
saniyathossain / description.txt
Last active December 9, 2020 06:54
VS Code Extensions
JetBrains Mono Font: Just a Programming Font
Ayu Theme: Theme for vscode
Docker: for view, run, inspect docker image, container, network, volume etc.
Bracket Pair Colorizer 2: for coloring bracket pairs for better visualization inside code
File Utils: for sidebar enhancement -> (like duplicate file etc.. from left panel)
Editor Config: For editor configs
DotENV: for easier linting and syntax highlighting .env files
PHP Intellisense: This extension is very important for PHP lint, format, autocomplete class, Import class, go to class, method directly from code etc..
Inline Parameters for VSCode: optional: phpstorm like method argument highlighting
PHP Docblock: useful for adding method, class etc. top inline documentation
@saniyathossain
saniyathossain / Dockerfile
Created September 13, 2020 09:20 — forked from BretFisher/Dockerfile
WIP sample Laravel php_fpm plus nginx plus supervisor Docker setup with npm, composer, bower, and more
FROM yourdockername/base-php-nginx:latest AS build
# BUILD STAGE
# the primary reason we have two build stages is so SSH key of private repo's will never
# be in final image
# COPY IN BUILD SSH KEY
# It won't be copied to final image
# add this build arg to compose file
ARG BUILDKEY
RUN if [ -z "$BUILDKEY" ]; then echo "BUILDKEY SSH NOT SET - ERROR"; exit 1; else : ; fi
@saniyathossain
saniyathossain / TagTrait.php
Last active July 30, 2020 03:45
Trait for A Virtual Field to Laravel Model Collection
<?php
namespace App\Eloquents\Traits;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Str;
use ReflectionClass;
/**
* Generates prefixed column along with padded specific model attribute (e.g. model table primary key attribute)