Skip to content

Instantly share code, notes, and snippets.

View deamondz's full-sized avatar

Lukyanov Dmitriy deamondz

View GitHub Profile
setInterval(function() {
for (var h in Game.shimmers){
Game.shimmers[h].pop();
}
}, 1000);
// --- Calculator
function Calculator () {
this.schema = [
{
@deamondz
deamondz / quiz.md
Last active December 28, 2016 09:33
  1. Когда вызывается метод componentWillMount? ===
  • Перед тем, как произойдёт первый рендер компонента

  • Сразу после того, как произойдёт первый рендер компонента

  1. Будет ли элемент "div" иметь класс "active"? ===
@deamondz
deamondz / gist:6333058
Created August 25, 2013 09:55
Server.js for node.js
var http = require('http'),
fs = require( "fs" );
//HTTP part
var htmlTemplate = fs.readFileSync(
(__dirname + "/index.htm"),
"utf8"
),
server = http.createServer(function(req, res){
res.writeHead(200,{ 'Content-Type': 'text/html' });
<div class="visible_area">
<nav class="page_nav">
<ul>
<li><a href="#ac1"></a></li>
</ul>
</nav>
<article id="ac1">
<h2></h2>
</article>
</div>