Skip to content

Instantly share code, notes, and snippets.

View MahbbRah's full-sized avatar
🎯
Focusing

Mahbub Rahman MahbbRah

🎯
Focusing
  • Dinajpur, Bangladesh
View GitHub Profile
@MahbbRah
MahbbRah / ffmpeg_commands.md
Last active August 5, 2019 11:17
I will try to include useful commands for ffmpeg video processing library :)

#Extract Audio from video ffmpeg -i 'input_file' -f mp3 -ab 192000 -vn 'output.mp3'

#Remove Audio From Video ffmpeg -i 'input_video_file' -vcodec copy -an 'output_video_file'

#Merge audio with a video. `ffmpeg -i video.mp4 -i audio.wav \

@MahbbRah
MahbbRah / gitPush.bash
Last active July 7, 2019 04:35
merging git all commands in a bash function to use as a command
# to use this function as a bash command add this to your bash_profile ~ root directory in windows and then reload bash profile
# and you're ready to go simply type: gitPush "commit message that you want to add";;
gitPush() {
git add .
#Here "$1" as the arugment that'll collect the mnessage for commit
git commit -am "$1"
git push -u origin master
}
@MahbbRah
MahbbRah / image_loading_check.js
Created May 1, 2019 09:48
Checking if a image loaded or not via img with js
function checkImage(imageSrc, good, bad) {
var img = new Image();
img.onload = good;
img.onerror = bad;
img.src = imageSrc;
}
//now we need to run the function written above to see if the image is loaded or not via callback
checkImage(
@MahbbRah
MahbbRah / agile_dev_basics.md
Last active April 19, 2019 06:42
This is a short assignment for my versity class top of Agile Development Methodology.

Name: Mahabur Rahman

Roll: 171442643

Dept: CSE(Eve)

Subject: System Analysis and Design

Assignment: Agile Development Methodology

@MahbbRah
MahbbRah / centering-react-native-content.md
Created December 12, 2018 02:07
Centering react native elements/contents from all the way, With Flex/Flexbox
// This example has been collected from react-Native official Project. :)


//Markup example
<View style={styles.container}>
  <Text style={styles.welcome}>Welcome to React Native!</Text>
  <Text style={styles.instructions}>To get started, edit App.js</Text>
 {instructions}
@MahbbRah
MahbbRah / Javascript_fetch_request_php_server.md
Last active January 9, 2020 09:30
Making http POST/GET request from React-Native/React/Javascript side (Using Fetch API) to PHP server
// A function that sends http POST request to PHP server by using Javascript Fetch API with async/await :) 
async function POST(url, payload){

    var body = Object.keys(payload).map((key) => {
        return encodeURIComponent(key) + '=' + encodeURIComponent(payload[key]);
    }).join('&');

 let options = {
@MahbbRah
MahbbRah / react-native-push-notification
Created November 30, 2018 09:38
Setup Push Notification with React Native (Instructions/Guide)
Setup of React native push notification is very easy things. But documentations and all that isn't right the way it should be.
So in this short snippet I'm going to explain, How you can achieve this without any issues!
#This guid is for only Android Developers for now
#First step
> we will use this library for push notification: https://github.com/zo0r/react-native-push-notification Install this library on with your project
> and then do a link it as mentioned. But Only linking is not enough at all!
@MahbbRah
MahbbRah / doctorAchenLogin.html
Last active October 15, 2018 05:54
AccountKit Implementation (Live) for Doctor Achen.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge, chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, minimum-scale=1">
<title>Accountkit</title>
</head>
<body>
@MahbbRah
MahbbRah / Docker Note
Last active September 19, 2018 17:03
Notes on using Docker [Step by Step]
#Docker Installation:
First, add the GPG key for the official Docker repository to the system:
`curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -`
`sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"`
`sudo apt-get update`
Make sure you are about to install from the Docker repo instead of the default Ubuntu 16.04 repo:
`apt-cache policy docker-ce`
@MahbbRah
MahbbRah / install babel for ES6
Created October 11, 2017 05:32
Install babel for ES6 on clean & fresh project
# install babel with npm or yarn
`npm install --save-dev babel-cli`
=> add a script on `package.json` for babel with this line: `babel-node FILENAME_TO_SERVE`
=> install babel ES6 presets `npm install --save-dev babel-preset-es2015`
=> add es6 presets to `.babelrc` file `{ "presets": ["es2015"] }`
#And there we go!