Skip to content

Instantly share code, notes, and snippets.

View eMahtab's full-sized avatar
💭
مهتاب

Mahtab Alam eMahtab

💭
مهتاب
View GitHub Profile
@eMahtab
eMahtab / Learning-Docker
Created April 17, 2017 11:08
Learning-Docker
Installing Docker on Linux https://www.youtube.com/watch?v=wPmvN7KcOlI
Creating your first Dockerfile, image and container https://www.youtube.com/watch?v=hnxI-K10auY
@eMahtab
eMahtab / example.cs
Created April 8, 2017 16:45 — forked from brandonmwest/example.cs
Generating base64-encoded Authorization headers in a variety of languages
httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue(
"Basic",
Convert.ToBase64String(
System.Text.ASCIIEncoding.ASCII.GetBytes(
string.Format("{0}:{1}", username, password))));
@eMahtab
eMahtab / Installing Java on Ubuntu
Created March 26, 2017 13:37
Installing Java on Ubuntu
#Step 1 Download the latest zipped JDK from Oracle's website , most probably you will get it downloaded into Downloads directory
#Step 2 Extract the zipped jdk file in the Downloads directory, follow below commands
cd ~/Downloads
tar -xzf jdk-8u121-linux-x64.tar.gz
#Step 3 Move the extracted jdk directory inside /usr/local directory, follow below command
sudo mv ~/Downloads/jdk1.8.0_121 /usr/local/
@eMahtab
eMahtab / 99 Names of Allah
Last active January 16, 2017 08:49
99 Names of Allah
Ar-Rahman
Ar-Raheem
Al-Malik
Al-Quddus
As-Salaam
Al-Mumin
Al-Muhaymin
Al-Aziz
Al-Jabbar
Al-Mutaqabir
@eMahtab
eMahtab / gist:7e67884b4e89c67f238046fe5e4e6508
Created January 12, 2017 09:41
webpack-dev-server does not produce bundle.js
The webpack-dev-server prevents webpack from emitting the resulting files to disk. Instead it keeps and serves the resulting
files from memory. This means that you will not see the webpack-dev-server build in bundle.js, to see and run the build,
you must still run the webpack command.
To generate the bundle.js, run
webpack
To generate minified bundle.js, run
@eMahtab
eMahtab / gist:018ccae028273202a5580a00cb964bab
Last active January 9, 2017 04:52
ES6 Exporting and Importing Modules
Exporting //math/addition.js
function sumTwo(a, b) {
return a + b;
}
function sumThree(a, b, c) {
return a + b + c;
}
@eMahtab
eMahtab / gist:82094cfa074210216b84eb4a7162c8aa
Created December 27, 2016 10:37
Configuring multiple sites reverse proxy with nginx
server{
listen 80;
server_name mahtabalam.net;
location / {
proxy_pass "http://127.0.0.1:3000";
}
}
@eMahtab
eMahtab / nginxproxy.md
Created December 27, 2016 09:24 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@eMahtab
eMahtab / Setting NGINX as reverse proxy for multiple express application
Created December 27, 2016 08:37
Setting NGINX as reverse proxy for multiple express application
server{
listen 80;
location / {
proxy_pass "http://127.0.0.1:3000";
}
location /codify {
rewrite ^/codify(.*) $1 break;
proxy_pass "http://127.0.0.1:3001";
@eMahtab
eMahtab / gist:eb309745cf07daf0d82cd0e5079ad783
Created September 20, 2016 04:04 — forked from learncodeacademy/gist:5f84705f2229f14d758d
Getting Started with Vagrant, SSH & Linux Server Administration