Skip to content

Instantly share code, notes, and snippets.

View alsheuski's full-sized avatar

Alexey Alshevskiy alsheuski

View GitHub Profile
@alsheuski
alsheuski / 1-server.md
Created March 27, 2017 11:07 — forked from dragonjet/1-server.md
Setup Web Server on EC2 Amazon Linux AMI

Step 1: Server Credentials

This assumes you are now connected to the server via SSH.

  • sudo -s Enter root mode for admin access
  • groupadd devgroup Create new group to be later granted access to /var/www/html

Creating a new Root User

  • useradd -G root,devgroup masterdev Create new root user. Also add to the devgroup
  • passwd masterdev Change password for the new root user
  • At this point, you'll need to input your new root user's new password
@alsheuski
alsheuski / gist:94560107f491977375f1
Created April 16, 2015 07:25
Create native ajax-request
function createRequest() {
try{
request = new XMLHttpRequest();
} catch (trymicrosoft) {
try {
request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (othermicrosoft){
try{
request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (failed) {
<!-- Meta-теги для Facebook: -->
<meta property="og:title" content=""/>
<meta property="og:description" content=""/>
<meta property="og:image" content=""/>
<meta property="og:site_name" content=""/>
<meta property="og:url" content=""/>
<!-- Meta-теги для Twitter: -->
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content=""/>