Skip to content

Instantly share code, notes, and snippets.

View mdunaev's full-sized avatar

Miša Dunaev mdunaev

View GitHub Profile
@mdunaev
mdunaev / readme.md
Last active December 6, 2018 09:46
Test task for FE

Test task for Frontend Engeneer

Please, create photogallery using public API from any photo hosting or mocked data.

Gallery should have:

  • prev/next buttons
  • keyboard controll - prev/next
  • zoom current photo to fullscreen
  • looped - first photo should appear after last
@mdunaev
mdunaev / test.js
Last active February 5, 2018 14:35
const config = {
from: accounts[0],
gasPrice: 5500000000,
gasLimit: 50000,
value: 0,
nonce: confirmedTransactionNum + unconfirmedTransactionNum
};
controllerContract.methods.setPixel(data, color).send(config)
.on("transactionHash", console.log);
@mdunaev
mdunaev / teeterTotter.js
Created January 22, 2018 20:26
teeterTotter
const teeterTotter = (max, current) => {
const x2 = current % (max * 2);
const x1 = current % max;
return (x2 > x1) ? max - x1 : x1;
}
function setPixel(uint coordinate, uint color) public {
require(color < 16);
require(coordinate < 1000000);
var idx = coordinate / ratio;
var bias = coordinate % ratio;
var old = colors[idx];
var zeroMask = ~(bitMask << (n * bias));
colors[idx] = (old & zeroMask) | (color << (n * bias));
https://habrahabr.ru/post/327236/
https://ensrationis.gitbooks.io/learning-center-airalab/content/ru/preparing.html
@mdunaev
mdunaev / style.css
Created August 11, 2016 08:13
Font smoothing
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script src="/pushwoosh-web-notifications.js" type="text/javascript"></script>
</body>
</html>
let arr = Object.keys(obj).map((k) => obj[k])
@mdunaev
mdunaev / gist:40d9c199b05a45a438fa
Created March 11, 2016 21:22
Atom snippet for React ES6 class
'.source.js.jsx':
'React ES6 Component':
'prefix': 'rc'
'body': """
import React from 'react';
export default class ${1:MyComponent} extends React.Component {
render() {
return (
<div className="$1">
@mdunaev
mdunaev / 1-1000.txt
Created February 13, 2016 12:55 — forked from deekayen/1-1000.txt
1,000 most common US English words
the
of
to
and
a
in
is
it
you
that