Skip to content

Instantly share code, notes, and snippets.

View Murmurianez's full-sized avatar

Aleksey Andreev Murmurianez

  • Russia, Saint-Petersburg
View GitHub Profile
@Murmurianez
Murmurianez / Node.js CORS
Created September 14, 2017 18:12 — forked from nilcolor/Node.js CORS
Node.js cross-origin POST. You should response for OPTIONS request first. Something like this.
if (req.method === 'OPTIONS') {
console.log('!OPTIONS');
var headers = {};
// IE8 does not allow domains to be specified, just the *
// headers["Access-Control-Allow-Origin"] = req.headers.origin;
headers["Access-Control-Allow-Origin"] = "*";
headers["Access-Control-Allow-Methods"] = "POST, GET, PUT, DELETE, OPTIONS";
headers["Access-Control-Allow-Credentials"] = false;
headers["Access-Control-Max-Age"] = '86400'; // 24 hours
headers["Access-Control-Allow-Headers"] = "X-Requested-With, X-HTTP-Method-Override, Content-Type, Accept";
.tab{float:left; width:32px; height:32px; background:#FFFFFF;}
.tab:hover{background:#F7F7F7;}
.tab.active{background:#01A1DC; color:#FFFFFF;}
.tab-content{display:none; float:left; width:300px; height:200px; background:#FFFFFF; border:1px solid #d8d5d6;}
.tab-content.active{display:block;}
@Murmurianez
Murmurianez / jsbin.eKacunu.css
Created January 17, 2014 11:14 — forked from anonymous/jsbin.eKacunu.css
Трёхколоночная, трёхстрочная таблица под размер окна.
html, body{
height: 100%;
margin: 0;
}
.table{
height: 100%;
position: relative;
background: green;
margin-bottom: -65px;
.lavaLamp {
position: relative;
height: 29px; width: 421px;
padding: 15px; margin: 10px 0;
overflow: hidden;
}
/* Force the list to flow horizontally */
.lavaLamp li {
float: left;
list-style: none;