Skip to content

Instantly share code, notes, and snippets.

View Maxim-Mazurok's full-sized avatar
👨‍💻
Building great stuff

Maxim Mazurok Maxim-Mazurok

👨‍💻
Building great stuff
View GitHub Profile
@Maxim-Mazurok
Maxim-Mazurok / index.js
Created April 27, 2020 08:38
Get download stats of all gapi.client.* packages from npmjs api from behind a proxy
const http = require('http');
const https = require('https');
const { getProxySettings } = require('get-proxy-settings');
const apis = [
'acceleratedmobilepageurl',
'adexchangebuyer',
'adexchangebuyer2',
'adexchangeseller',
'adexperiencereport',
@Maxim-Mazurok
Maxim-Mazurok / index.js
Last active April 16, 2020 14:42
Download all available Vue Mastery lessons
/**
* Tested with "selenium-webdriver": "^4.0.0-alpha.7"
* and NodeJS v12.14.0
* on April 17, 2020
*
* Make sure to download Chrome selenium WebDriver for your version: https://chromedriver.chromium.org/downloads
* and put it in the same folder as this file or add to PATH
* Tested on Chrome 81
*
* This script downloads pages with embedded videos, lesson materials and links to challenges
@Maxim-Mazurok
Maxim-Mazurok / apigee_v1.json
Created March 19, 2020 11:52
Apigee API Platform Google Cloud type defintions
{
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/cloud-platform": {
"description": "View and manage your data across Google Cloud Platform services"
}
}
}
},
@Maxim-Mazurok
Maxim-Mazurok / neural_net_demo.py
Created January 26, 2020 21:29
Demo of very basic Neural Network in Python 3 (Siraj Raval - Build a Neural Net in 4 Minutes)
# Credits: https://www.youtube.com/watch?v=h3l4qz76JhQ
# Basic description: teach NN to output [0, 1, 1, 0] for different inputs
import numpy as np
def nonlin(x, deriv=False):
if(deriv == True):
return x*(1-x)
return 1/(1+np.exp(-x))
@Maxim-Mazurok
Maxim-Mazurok / changes.txt
Created January 15, 2020 14:17
Google API changes gathered for Maxim-Mazurok/google-api-typings-generator (ignored etag changes)
[2020-01-11T10:45:40.481Z] cloudtasks:v2 changed
[2020-01-11T10:45:44.947Z] container:v1 changed
[2020-01-11T10:46:22.845Z] servicecontrol:v1 changed
[2020-01-11T10:51:30.877Z] videointelligence:v1p2beta1 changed
[2020-01-11T11:00:36.061Z] cloudtasks:v2beta3 changed
[2020-01-11T11:01:33.275Z] videointelligence:v1 changed
[2020-01-11T11:05:45.472Z] discovery:v1 changed
[2020-01-11T11:10:39.723Z] cloudsearch:v1 changed
[2020-01-11T11:10:40.262Z] cloudtasks:v2beta2 changed
[2020-01-11T11:20:32.116Z] classroom:v1 changed
@Maxim-Mazurok
Maxim-Mazurok / index.d.ts
Created January 11, 2020 08:57
Google Tasks API v1 1.0
// Type definitions for non-npm package Tasks API v1 1.0
// Project: https://developers.google.com/google-apps/tasks/firstapp
// Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
// IMPORTANT
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
// Generated from: https://www.googleapis.com/discovery/v1/apis/tasks/v1/rest
@Maxim-Mazurok
Maxim-Mazurok / changes.txt
Last active January 11, 2020 10:58
Google API changes gathered for Maxim-Mazurok/google-api-typings-generator
[2020-01-07T21:10:32.008Z] cloudidentity:v1beta1 changed
[2020-01-07T21:10:50.175Z] fcm:v1 changed
[2020-01-07T21:15:31.100Z] classroom:v1 changed
[2020-01-07T21:16:11.734Z] runtimeconfig:v1 changed
[2020-01-07T21:21:10.775Z] remotebuildexecution:v1alpha changed
[2020-01-07T21:21:25.053Z] sheets:v4 changed
[2020-01-07T21:26:32.119Z] tagmanager:v1 changed
[2020-01-07T21:36:09.790Z] runtimeconfig:v1beta1 changed
[2020-01-07T21:36:11.287Z] script:v1 changed
[2020-01-07T21:41:24.950Z] slides:v1 changed
@Maxim-Mazurok
Maxim-Mazurok / error-log.txt
Created November 16, 2019 08:58
Error log for declanvong/google-api-typings-generator
/home/maxim/.nvm/versions/node/v12.13.0/bin/node /home/maxim/.nvm/versions/node/v12.13.0/lib/node_modules/npm/bin/npm-cli.js run start --scripts-prepend-node-path=auto
> gmail-api-typings-generator@ start /home/maxim/IdeaProjects/google-api-typings-generator
> ts-node src/google-api-typings-generator.ts --out ./types
/home/maxim/IdeaProjects/google-api-typings-generator/node_modules/ts-node/src/index.ts:293
return new TSError(diagnosticText, diagnosticCodes)
^
TSError: ⨯ Unable to compile TypeScript:
@Maxim-Mazurok
Maxim-Mazurok / grub2-password-protection-centos.sh
Last active May 18, 2019 23:59
Protect GRUB2 with password on CentOS
# Protect GRUB2 with password on CentOS:
#
# Tested (basic):
# 1. Run:
sudo grub2-setpassword # to set root password
# 2. Update GRUB config:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
#
# Not tested (advanced):
# 1. Run 'grub2-mkpasswd-pbkdf2' as root to generate encrypted password.
@Maxim-Mazurok
Maxim-Mazurok / codecanyon-mass-unfollow.js
Created May 18, 2019 23:30
Script that parses first 10 pages of your followings and prints curl-commands to unfollow them on codecanyon.net
// script that parses first 10 pages of your followings and prints curl-commands to unfollow them on codecanyon.net
const fetch = require("node-fetch");
const regex = /<a class="avatar" title="(.+?)"/gm;
//TODO: change pages count if needed
for (let page = 1; page <= 10; page++) {
fetch(`https://codecanyon.net/user/maxim_mazurok/following?page=${page}`)
.then(res => res.text())