Skip to content

Instantly share code, notes, and snippets.

View vvscode's full-sized avatar
⌨️
Here is Rhodes, jump here!

Vasiliy Vanchuk vvscode

⌨️
Here is Rhodes, jump here!
View GitHub Profile
@vvscode
vvscode / JXA Resources.md
Created November 9, 2024 16:39 — forked from JMichaelTX/JXA Resources.md
JavaScript for Automation (JXA) Resources

JXA Resources

Revised: 2019-11-28 16:16 GMT-6

JXA

This is a list of the key resources I have found useful. If you know of others, please post in a comment below, and I will add to this list.

I have tried to order this list in the order that, to me, is best for learning JXA from scratch. We all learn a bit diferently, so adjust to suit your style/needs. Please post if you have suggestions on learning JXA.

@vvscode
vvscode / dropbox-php-auth.md
Created June 30, 2022 05:41 — forked from phuze/dropbox-php-auth.md
Dropbox API V2: PHP Authentication Process

Effective September 2021, Dropbox will be deprecating long-lived access tokens.

This GIST generally describes how to authenticate requests to Dropbox API v2, for anyone working on a server-side PHP Dropbox implementation.

It's important to understand three types of codes you'll encounter:

  1. Access Code - this is a one-time code that represents user-granted app access.
  2. Access Token - this is short-lived token that provides access to Dropbox API endpoints.
  3. Refresh Token - this is a long-lived token that allows you to fetch a fresh Access Token.

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 / otus_python_web_hometask_1.md
Created December 1, 2019 16:14 — forked from grepto/otus_python_web_hometask_1.md
OTUS - Web-разработчик на Python Задачи из чата первого занятия

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

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

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

print(result)
const {
getChange
} = require('./getChange');
const assert = require('assert');
const TESTS = [{
dealDetails: [1, 1],
change: [0, 0, 0, 0, 0, 0]
},
{
const {
buildSquareStr
} = require('./buildSquareStr');
const assert = require('assert');
const SQUARES = {
1: `■`,
3: [`□□□`, `□■□`, `□□□`].join('\n'),
5: [`■■■■■`, `■□□□■`, `■□■□■`, `■□□□■`, `■■■■■`].join('\n'),
7: ['□□□□□□□', '□■■■■■□', '□■□□□■□', '□■□■□■□', '□■□□□■□', '□■■■■■□', '□□□□□□□'].join('\n'),

@kangax's ES6 quiz, explained

@kangax created a new interesting quiz, this time devoted to ES6 (aka ES2015). I found this quiz very interesting and quite hard (made myself 3 mistakes on first pass).

Here we go with the explanations:

Question 1:
(function(x, f = () =&gt; x) {
@vvscode
vvscode / godmode.js
Created September 4, 2016 17:29
God Mode in JavaScript
// что возвращает эта функция?
(function fun(Infinity, length, __proto__)
{
return [,,~0.[0|0]][fun.__proto__.length && Infinity, -~String(this).length >> __proto__] << (0. === .0) + Infinity;
}).apply(typeof fun, [,,2]);
// рассмотрим массив с аргументами:
// "0" in [,,2] => false
// "1" in [,,2] => false
@vvscode
vvscode / ember.js-videos.md
Created October 25, 2015 19:41 — forked from listochkin/ember.js-videos.md
Ember.js Video Collection
  1. Официальные видео:
  2. Toran Billups записал очень хорошие базовые видео:
  3. Архитектура:

##Офтоп

  • Почему решили покинуть предыдущее место работы?

##Теория

  • В чем разница между inline, block, inline-block?
  • Чем отличается margin от padding?
  • Что такое overflow, когда он нужен?
  • Чем отличаются position static, absolute, relative, fixed?
  • Что вы знаете о приоритете селекторов?
  • Как браузер обрабатывает селекторы? Какие из них более производительные?