Skip to content

Instantly share code, notes, and snippets.

View me-shaon's full-sized avatar
💭
Learning...

Ahmed shamim me-shaon

💭
Learning...
View GitHub Profile
@me-shaon
me-shaon / virtual-host-ubuntu.txt
Last active October 30, 2016 10:02
Create Virtual Host in Apache Server (Ubuntu)
# Go to /etc/apache2/sites-available/
# Create a file with the name of the virtual host consisting the '.conf' extension. Like myproject.com.conf
# Put the following code on that file
<VirtualHost *:80>
ServerName myproject.com
ServerAlias www.myproject.com
DocumentRoot /var/www/html/file_path_of_the_project
<Directory /var/www/html/file_path_of_the_project>
Options -Indexes +FollowSymLinks +MultiViews
@me-shaon
me-shaon / config-eslint-in-atom.md
Last active May 6, 2017 06:27
Configuring eslint in Atom Editor
  • Install linter plugin in Atom
  • Install linter-eslint plugin in Atom
  • Create a .eslintrc file in project root
  • If there is no package.json file already in the project root, create one using:
npm init
  • Run the following command to working with the 'google eslint rules'-
npm install --save-dev eslint eslint-config-google

#Header

###AnotherHeader

Lorem ipsum dolor sit amet, consectetur [Broken Link] (http://link_url) adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

@me-shaon
me-shaon / github-markdown-fixer.py
Last active May 19, 2017 09:56
Github markdown fixer script in python
import sys
import os
import glob
import re
import codecs
def fixItRalph(dirPath):
#List of Regular Expressions need to apply
changeRules = [
{ 'find': r'^(#+)([^ #].+)$', 'replaceWith': r'\1 \2' }, #Header Elements fixers
@me-shaon
me-shaon / object_2.js
Created November 7, 2017 12:36
Javascript Object 2
var person = new Object(); //this is an object
//Adding dynamic properties to the 'person' object
person.firstName = "John";
person.lastName = "Doe";
person.age = 50;
@me-shaon
me-shaon / object_1.js
Last active November 7, 2017 12:37
Javascript Object 1
//following is an Javascript object
var person = {
firstName:"John",
lastName:"Doe",
age:50
}
@me-shaon
me-shaon / object_3.js
Last active November 7, 2017 12:44
Javascript Object 3
//This is known as constructor function or kind of a template for objects
function person(first, last, age) {
this.firstName = first;
this.lastName = last;
this.age = age;
}
var newPerson = new person("John", "Doe", 50); //this is a an object
@me-shaon
me-shaon / hello_world.cpp
Created November 9, 2017 15:06
Hello world C code
#include<stdio.h>
int main(){
printf("Hello world");
return 0;
}
@me-shaon
me-shaon / sample_js.js
Created November 13, 2017 13:28
Sample Function Scope example for Medium Article
function testFunction() { //Scope 1: Starts here. This scope is created by the Function block
var a = 1;
if(true) { //This block is not creating any new Scope
var b = 2;
console.log(a, b); //'a', 'b' both is accessible here
}
console.log(b); //Though 'b' defined inside the 'if' block, it's still accessible here
@me-shaon
me-shaon / js_hoisting.js
Last active November 14, 2017 14:59
Javascript hoisting example for Medium article
function hoist() {
a = 10;
console.log(a); //this will print '10'
var a;
}
hoist();