Skip to content

Instantly share code, notes, and snippets.

View marufmax's full-sized avatar
🎯
Focusing

Maruf Alom marufmax

🎯
Focusing
View GitHub Profile
@marufmax
marufmax / commando.sh
Last active April 7, 2023 14:48
my Most commonly used cli commands
** Finding a file**
```
find / -name "ansible" 2>&1 | grep -v "Permission denied"
```
** find a text in directory:**
grep -rnw /PATH/ -e 'minikube'
@marufmax
marufmax / Dockerfile
Created June 9, 2021 18:22
PHP 8 with Imagick Dockerfile
## This is a very basic PHP 8 Dockerfile with Imagick installed from source
## Modify/Customize this file as per your need
FROM php:8.0-fpm
RUN apt-get update && \
apt-get install openssl -y && \
apt-get install libssl-dev -y && \
apt-get install wget -y && \
apt-get install git -y && \

Docker Commands

Some docker commands I found useful on internet. Instead of searching them everytime this is where I do keep track of them 🎉

Remove and Kill all running containers

docker stop $(docker ps -a -q)
@marufmax
marufmax / ImageUpload.vue
Created November 3, 2019 11:52
Simple VueJS Multiple Image Upload
<template>
<div>
<ul class="el-upload-list el-upload-list--picture-card">
<li
v-for="image in images"
tabindex="0"
class="el-upload-list__item is-ready"
>
<div>
<img
@marufmax
marufmax / ~\.ssh\config
Created April 11, 2019 11:49
SSH Bitbucket and Deployment User
Host *
IgnoreUnknown AddKeysToAgent,UseKeychain
UseKeychain yes
AddKeysToAgent yes
IdentityFile ~/.ssh/id_rsa_bitbucket
@marufmax
marufmax / bitbucket-pipelines.yml
Created January 17, 2019 11:44 — forked from mcnamee/bitbucket-pipelines.yml
Bitbucket Pipelines - Deploy via FTP to shared hosting
# Installation ---
# 1. In Bitbucket, add $FTP_USERNAME $FTP_PASSWORD and $FTP_HOST as environment variables.
# 2. Commit this file to your repo
# 3. From Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:Init (this will
# push everything and initial GitFTP)
#
# Usage ---
# - On each commit to master branch, it'll push all files to the $FTP_HOST
# - You also have the option to 'init' (from Bitbucket Cloud) - pushes everything and initialises
# - Finally you can also 'deploy-all' (from Bitbucket Cloud) - if multiple deploys fail, you
@marufmax
marufmax / 00_readme.md
Last active January 15, 2019 05:24
Optimizing Wordpress Site

This is a file repo for a blog post

visit

@marufmax
marufmax / App\Exceptions\Handler.php
Last active December 17, 2018 10:15
Laravel/Lumen API Error Handleing
<?php
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
{
@marufmax
marufmax / README.md
Created October 18, 2018 04:46 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@marufmax
marufmax / migration.sql
Last active September 22, 2018 05:41
Laravel package Entrust Migration in SQL
-- Creating Roles Table
-- Create table for storing roles
create table roles ( id number(10,0) not null, name varchar2(255)
not null, display_name varchar2(255) null, description varchar2(255) null, created_at timestamp null, updated_at timestamp null,
constraint roles_id_pk primary key ( id ) )
alter table roles add constraint roles_name_uk unique ( name )
create sequence roles_id_seq start with 1
create trigger roles_id_trg