Skip to content

Instantly share code, notes, and snippets.


Rafayel Mkrtchyan MicBrain

View GitHub Profile
MicBrain / robots.txt
Last active Oct 7, 2016
The general structure of Web Robots used for controling search engine spiders
View robots.txt
# The file should be written in the ASCII format. Put the file in your root directory.
# If you want to exclude all web spiders from the entire server, you can use this:
User-agent: *
Disallow: /
# If you want the web spider to access everything you can use:
User-agent: *
View PageRank.txt
10 Ways To Improve Your Google Rank:
1. Focus on your content. Make sure you provide a quality content.
2. Regularly update your website.
3. Pointing Links to your Website.
4. Page Authority.
5. Use a site map(sample:
6. Effectively use "keyword" and "description" HTML Meta Tags. Make sure that the content of the website matches to these 2 tags.
7. Effectively use <title> tag.
8. Use ALT text on images.
MicBrain / sitemap.xml
Last active Oct 12, 2017
The Sitemaps protocol allows a webmaster to inform search engines about URLs on a website that are available for crawling.
View sitemap.xml
<!--It is strongly recommended that you place your Sitemap(sitemap.html) at the root directory of your HTML.-->
<?xml version="1.0" encoding="UTF-8"?>
MicBrain / structure.html
Last active Apr 22, 2020
The standard HTML5 page structure.
View structure.html
<!--To get more Meta Tags visit here: -->
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html">
<title> The name of your website. </title>
MicBrain / metatags.html
Last active Apr 6, 2021
The list of useful meta tags used in HTML5 documents.
View metatags.html
<!--Recommended Meta Tags-->
<meta charset="utf-8">
<meta name="language" content="english">
<meta http-equiv="content-type" content="text/html">
<meta name="author" content=”Rafayel Mkrtchyan”>
<meta name="designer" content=”Rafayel Mkrtchyan”>
<meta name="publisher" content=”Rafayel Mkrtchyan”>
MicBrain / gist:d1f6fcdd04fd988623f0
Last active Dec 30, 2015
Sending request to your Facebook friends
View gist:d1f6fcdd04fd988623f0
<title>First Meteor App.</title>
<h1> fb-welcome</h1>
window.fbAsyncInit = function() {
appId : '444506449070273',
View permutation.cpp
/* Given two strings, write a method to decide if one is a
* permutation of the other.
* @author: Rafayel Mkrtchyan
* @date: 9/16/2015
#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
View reverse.cpp
/* Problem 1.2: Implement a function void reverse(char* str)
* in C or C++, which reverses a null-terminated string.
* @author: Rafayel Mkrtchyan
* @date: 9/14/2015
#include <iostream>
/* This function takes an iterative approach to problem
* using an O(n) speed.
View Uniqueness.cpp
/* Problem 1.1: Implement an algorithm to determine if a string
* has all unique characters. What if you cannot use additional
* data structures?
* @author: Rafayel Mkrtchyan
* @date: 9/13/2015
#include <iostream>
#include <algorithm>
MicBrain / gist:437606e97e24982a83ae
Last active Aug 29, 2015
WaitForNext() Function
View gist:437606e97e24982a83ae
JobInfo* MultiFetcher::WaitForNext() {
int index;
int timeout = -1;
int length = getJobInfoList().size();
download_mgr->watch_fds_ =
static_cast<struct pollfd *>(smalloc(length * sizeof(struct pollfd)));
download_mgr->watch_fds_size_ = length;
for (index = 0; index < length; index++) {
download_mgr->watch_fd_[index].fd = JobInfo[idx].pipe_fd
download_mgr->watch_fd_[index].events = POLLIN | POLLPRI;