Skip to content

Instantly share code, notes, and snippets.

View k4mrul's full-sized avatar
😎
Keep smiling ;)

Abdul Hannan Kamrul k4mrul

😎
Keep smiling ;)
View GitHub Profile
@k4mrul
k4mrul / gist:89249098af10dbfcfe1aafc86b000eda
Created March 29, 2018 16:42 — forked from aioutecism/gist:2638bb9eaf9ffc13348c
Set up a VPN Server (PPTP) on AWS and use it anywhere

Set up a VPN Server (PPTP) on AWS

  1. Create a EC2 instance using Ubuntu 14.04.
  2. In Secure Group Inbound Rules, add a SSH Rule(TCP, Port 22, 0.0.0.0/0) and a Custom TCP Rule(TCP, Port 1723, 0.0.0.0/0).
  3. Optional: Associate a Elastic IP with the instance.
  4. SSH into the instance.
  5. sudo apt-get install pptpd.
  6. sudo vim /etc/pptpd.conf. Uncomment localip 192.168.0.1 and remoteip 192.168.0.234-238,192.168.0.245.
  7. sudo vim /etc/ppp/pptpd-options. Uncomment ms-dns and ms-wins. Change the IP to Google's DNS like this:
@k4mrul
k4mrul / regex.md
Created December 23, 2016 06:24 — forked from jacurtis/regex.md
Most Useful Regex's

#Useful Regular Expressions

These are the most useful Regular Expressions that I find myself using on a regular basis


URLs

Test to see if a string is a valid website address or not.

All URLs
@k4mrul
k4mrul / wordpress-image-crop.php
Last active September 3, 2016 07:03 — forked from raselahmed7/wordpress-image-crop.php
Wordpress image crop
<?php
// in functions.php
add_theme_support( 'post-thumbnails');
/*
Wordpress crop an image = 5 size. Sizes are given below
thumbnail // Thumbnail (default 150px x 150px max)
@k4mrul
k4mrul / 0_reuse_code.js
Created August 24, 2016 16:28
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console