Skip to content

Instantly share code, notes, and snippets.

View MicBrain's full-sized avatar

Rafayel Mkrtchyan MicBrain

View GitHub Profile
@MicBrain
MicBrain / robots.txt
Last active October 7, 2016 20:14
The general structure of Web Robots used for controling search engine spiders
# 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: *
Disallow:
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: https://gist.github.com/MicBrain/e5125d4b861c3071c63560b51ee66634)
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
MicBrain / sitemap.xml
Last active October 12, 2017 12:17
The Sitemaps protocol allows a webmaster to inform search engines about URLs on a website that are available for crawling.
<!--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"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc>http://www.book-selves.com/</loc>
@MicBrain
MicBrain / structure.html
Last active April 22, 2020 22:14
The standard HTML5 page structure.
<!DOCTYPE HTML>
<html>
<head>
<!--To get more Meta Tags visit here: https://gist.github.com/MicBrain/46a9723158307fd30db66a4b2af85411 -->
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html">
<title> The name of your website. </title>
@MicBrain
MicBrain / metatags.html
Last active April 8, 2024 12:53
The list of useful meta tags used in HTML5 documents.
<html>
<head>
<!--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
MicBrain / gist:d1f6fcdd04fd988623f0
Last active December 30, 2015 21:17
Sending request to your Facebook friends
<head>
<title>First Meteor App.</title>
</head>
<body>
<h1> fb-welcome</h1>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '444506449070273',
/* 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>
/* 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.
/* 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
MicBrain / gist:437606e97e24982a83ae
Last active August 29, 2015 14:27
WaitForNext() Function
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;