Skip to content

Instantly share code, notes, and snippets.

View daniil4udo's full-sized avatar
🇺🇦

Daniil Chudo daniil4udo

🇺🇦
View GitHub Profile
@daniil4udo
daniil4udo / ssh-login.bash
Last active June 9, 2019 09:34
SSH Snippets to login to the server
# SSH Cheat Sheet
# Create folder, file, install Apache (Just messing around)
mkdir test
cd test
# Create hello.txt file
touch hello.txt
# Install Apache server
@daniil4udo
daniil4udo / linkedin-messages-cleaner.md
Last active June 18, 2019 08:14
Clean all messages in LinkedIn

LinkedIn Message cleaner

Small script that helps you clean all your messages

You have to select each message one by one. It takes about 4 "clicks" to successfully delete a message.

Once you initiate the script, it will run every second. If a message has the ability to be deleted, it will be. If not, it will be archived. Some "InMail" messages cannot be deleted on the web app. This script should work as long as LI doesn't change their page layout or element names, which will happen eventually.

Last tested: April, 24, 2019

How

@daniil4udo
daniil4udo / price-in-stock-script-adwords.md
Created June 7, 2019 16:57
Script to update the price and control the availability of the product in Adwords

The script to update the price in the ad and check the availability of the item in Adwords

Many website owners or PPC experts have faced the need to automate contextual advertising.

After all, automation will make boring work for you, and will allow you to engage in more interesting business.

What does the script do?

  • Enable / disable the notification about the availability status of the item on the site.
@daniil4udo
daniil4udo / hold-positions-adwords-script.md
Last active June 7, 2019 17:00
Holding the position or setting to hold the desired position in AdWords

Holding the position or setting to hold the desired position in AdWords

Very often, when conducting contextual advertising, there is a question of choosing or keeping a particular position of an ad.

function main() {
    // anchor array
    // If one is just a shortcut type "Shortcut1".
    // If an array then ["Shortcut1", "Shortcut2", ..., "ShortcutN"]
    var LabelNames = ["ck"];
@daniil4udo
daniil4udo / whats-new-in-js-io19.md
Created June 8, 2019 22:24
New features in JS from I/O19

Whats's new in JS

Array {flat, flatMap}


//Flat one level
const arr = [1, [2, [3]]]
arr.flat(); // <- (3) [1, 2, 3]
@daniil4udo
daniil4udo / swap-elements.js
Last active June 9, 2019 10:36
How swap two values without temporary variables using JavaScript?
// How swap two values without temporary variables using JavaScript?
// Solution only for integers
//1
a = a + b
b = a - b
a = a - b
// or
@daniil4udo
daniil4udo / compose-pipe-js.md
Created June 8, 2019 22:31
Compose & Pipe functions in JavaScript

Compose functions in JavaScript

Order - right to left


//compose for multiple functions
const composeMultiple = (f, g) => (...data) => f(g(...data)) //composing 2 functions
const composeFunctions = (...fns) => fns.reduce(composeMultiple)
@daniil4udo
daniil4udo / sprear-rest-operator.js
Last active June 9, 2019 10:39
Spread and Rest operators in Javascript
/*
Spread Operator
*/
// Add the elements of an existing array into a new array
var certsToAdd = ['Algorithms and Data Structures', 'Front End Libraries'];
var certifications = [
'Responsive Web Design',
...certsToAdd,
@daniil4udo
daniil4udo / cc-interview-questions.md
Last active June 9, 2019 13:30
Some of CSS interview questions
  • What is the difference between classes and IDs in CSS?

  • What's the difference between "resetting" and "normalizing" CSS? Which would you choose, and why?

  • Describe Floats and how they work.

  • Describe z-index and how stacking context is formed.

  • Describe BFC(Block Formatting Context) and how it works.

@daniil4udo
daniil4udo / htacces-hide-site-from-crawlers.md
Created June 9, 2019 07:47
Example of .HTACCES file to hide you site from crawlers

Example of .HTACCES file to hide you site from crawlers

.HTACCESS examples for Apache (mod_rewrite & mod_setenvif) and NGNIX setting

to hide your site or PBN from crawlers like Ahrefs, Riddler, Detectify etc.

htaccess-hide-your-PBN-mod_rewrite