Skip to content

Instantly share code, notes, and snippets.

Yep, that's pretty good

web.ivan kv9991

Yep, that's pretty good
Block or report user

Report or block kv9991

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kv9991 /
Created Mar 7, 2019
Clone with specific SSH key
ssh-agent bash -c 'ssh-add [path-to-key]; git clone [ssh-link-to-repository]'
kv9991 / mongo.js
Last active Jan 20, 2019
Get tasks with user result
View mongo.js
$lookup: {
from: "taskresults",
localField: "_id",
foreignField: "task",
as: "taskResult"
}, {
$match: {
"taskResult.user": {
kv9991 / min-width.js
Created Dec 7, 2018
Viewport with content min-width
View min-width.js
if (screen.width < 450){
var viewport = document.querySelector("meta[name=viewport]");
var newViewport = document.createElement("meta");
newViewport.setAttribute("name", "viewport");
newViewport.setAttribute("content", "width=450");
kv9991 / phantom.js
Created Nov 9, 2018
Phantom.js taking screen
View phantom.js
var child_process, createScreenshot, phantom, url;
phantom = require('phantom'); // npm install phantom
child_process = require('child_process');
url = "";
createScreenshot = function(page, filename) {
return page.render(filename, function() {
kv9991 / buttonoverride.css
Created Oct 31, 2018
Button overriding basic styles
View buttonoverride.css
button {
background: none;
color: inherit;
border: none;
padding: 0;
font: inherit;
cursor: pointer;
box-shadow: none;
outline: inherit;
kv9991 / getUserFeed.js
Created Sep 14, 2018
Find user feed posts
View getUserFeed.js
const yesterday = - 1000*60*60*24;
const getUserFeed = (userId, params) => User.findById(userId)
.then(user =>
[POST_ENTRY_CREATED]: { $gt: yesterday },
View file.js
var Parent = mongoose.model('Parent', parentSchema);
var parent = new Parent({ children: [{ name: 'Matt' }, { name: 'Sarah' }] })
parent.children[0].name = 'Matthew';
// `parent.children[0].save()` is a no-op, it triggers middleware but
// does **not** actually save the subdocument. You need to save the parent
// doc.;
kv9991 /
Last active Jul 20, 2018
React Exam


Вопрос 1

Жизненный цикл React компонента. Все различия между функциональными компонентами и компонентами основанными на React.Component.
Особенности работы setState

Вопрос 2

Как работает JSX. Описать работу компилятора
kv9991 / file.js
Created Jul 19, 2018
Key-value tables pattern
View file.js
import {
} from "@consts/course";
* Array of available statuses
const availableStatuses = [
kv9991 /
Last active Jul 7, 2018
Javascript Exam


Общие вопросы JS

Вопрос 1

Массивы в JS. Основные методы работы с массивами, способы создания массивов, тонкости работы некоторых методов таких как Push, Pop итд

Вопрос 2

Что такое замыкания в JS. Как работают области видимости. Как работает ключевое слово This

Вопрос 3

You can’t perform that action at this time.