Skip to content

Instantly share code, notes, and snippets.

Avatar
⌨️
Here is Rhodes, jump here!

Vasiliy Vanchuk vvscode

⌨️
Here is Rhodes, jump here!
View GitHub Profile
View how-to-download-iOS-simulator-in-command-line-and-install-it.md

How to Download iOS Simulator (Xcode) in Command Line and Install it

For faster connection speed and more flexibility.

Steps

  1. Start Xcode in command line by running this in commandline /Applications/Xcode.app/Contents/MacOS/Xcode
  2. Start downloading of the simulator
  3. Cancel it. YES CANCEL IT!
  4. You will get a message like this:
@vvscode
vvscode / GoL in js.md
Last active Oct 4, 2020
# Заметки по операциям, для реализации игры "Жизнь"
View GoL in js.md

Заметки по операциям, для реализации игры "Жизнь"

Работа с массивами

Создать массив

const arr1 = [];
const arr2 = [1, 2, 3];
@vvscode
vvscode / apply.test.js
Created Feb 28, 2020
apply tests for otus
View sum.test.js
describe("sum", function() {
it("функция", function() {
assert.isOk(typeof sum === "function");
});
it("по-умолчанию инициализируется нулем", function() {
assert.isOk(+sum() === 0);
});
it("инициализируется числом", function() {
assert.isOk(+sum(5) === 5);
});
View Resulted.sql
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "posts_tags" (
"post_id" INTEGER,
"tag_id" INTEGER,
FOREIGN KEY("post_id") REFERENCES "posts"("id"),
FOREIGN KEY("tag_id") REFERENCES "tags"("id")
);
CREATE TABLE IF NOT EXISTS "posts" (
"id" INTEGER NOT NULL,
"title" VARCHAR(100),
View commit-message.js
/**
* It takes commit message and append a branch name below
*/
const fs = require('fs');
const childProcess = require('child_process');
const commitMessageFile = process.argv[2];
/**
@vvscode
vvscode / otus_python_web_hometask_1.md
Created Dec 1, 2019 — forked from grepto/otus_python_web_hometask_1.md
OTUS - Web-разработчик на Python Задачи из чата первого занятия
View otus_python_web_hometask_1.md

Выведите все элементы, которые меньше 5.

l = [1, 2, 3, 4, 5, 6, 7]

result = [i for i in l if i < 5]

print(result)
View EventRecommenderSpec.js
describe("EventRecommender", () => {
const EventRecommender = require('../app/EventRecommender');
let er;
beforeEach(() => {
er = new EventRecommender();
});
describe("addEvent", () => {
it("adds a new Event to the system", () => {
@vvscode
vvscode / Feedback.js
Created Jun 26, 2019
Add fallback to `any` / `unknown` in case of errors in generating `.d.ts`
View Feedback.js
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import Link from '@tamm/ui-lib-link';
import Icon from '@tamm/ui-lib-icon';
import FeedbackModal from '@tamm/ui-lib-feedback-modal';
import nop from '@tamm/ui-lib-utils/nop';
import './Feedback.less';
import { STEP } from '@tamm/ui-lib-feedback-modal/FeedbackModal.const';
View Brackets from Bolt.js
/*
'(', '{', '[' are called "openers".
')', '}', ']' are called "closers".
Write an efficient function that tells us whether input string's openers
and closers are properly nested.
Examples:
"{ [ ] ( ) }" -> true
"{ [ ( ] ) }" -> false