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

Elasticsearch install Guid

Import Elasticsearch PGP Key


$ wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

Install Elasticsearch


@sdiama
sdiama / webview.js
Created May 29, 2019 17:47
React Native: Handle hardware back button @ webview
import React, { Component } from 'react';
import { WebView, BackHandler } from 'react-native';
export default class WebViewMoviezSpace extends Component {
constructor(props) {
super(props);
this.WEBVIEW_REF = React.createRef();
}
componentDidMount() {
@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 = {
@ofarukcaki
ofarukcaki / default.md
Last active November 29, 2023 12:00
create-react-app with react-router Nginx 404 error solution in page refresh

You need to edit /etc/nginx/sites/available/default file

change the location part as follows

location / { try_files $uri $uri/ /index.html; }

lastly, refresh the Nginx with sudo servuce restart nginx

@akashnimare
akashnimare / instructions.txt
Last active January 9, 2024 10:00
Download Frontend Master courses video. Note: This is for learning purpose only. Please don't mis-use it.
# Requirements
* Python 2.7
* Google Chrome
* ChromeDriver - WebDriver for Chrome
- Download the latest chromedrive which is 2.28 from here - https://sites.google.com/a/chromium.org/chromedriver/downloads
- Extract and move `chromedriver` file to `/usr/local/bin/chromedriver`
- git clone https://github.com/li-xinyang/OS_FrontendMaster-dl
- cd OS_FrontendMaster-dl
@pradeep1991singh
pradeep1991singh / index.android.ios.js
Last active October 30, 2020 14:44
Example AsyncStorage React Native
/**
* Example AsyncStorage React Native
* https://github.com/pradeep1991singh
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
@DHS
DHS / PHP Countries Array
Created November 4, 2011 18:51
PHP array of all country names
<?php
$countries = array("Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Island