This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementsByClassName("input")[1].innerHTML="This message was written via JS script! "; // Fills the text box message | |
var input = document.getElementsByClassName("icon btn-icon icon-send");//Grabs the send button | |
input[0].click();// Clicks the send button |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var img_dom = document.getElementsByClassName('image-thumb-body'); | |
var links = []; | |
for (var i = 0; i< img_dom.length;i++){ | |
links.push(img_dom[i].src); | |
} | |
function downloadAll(urls) { | |
var link = document.createElement('a'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var img_dom = document.getElementsByClassName('image-thumb-body'); | |
var links = []; | |
for (var i = 0; i< img_dom.length;i++){ | |
links.push(img_dom[i].src); | |
} | |
function downloadAll(urls) { | |
var link = document.createElement('a'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = document.getElementsByClassName('uiTextareaNoResize uiTextareaAutogrow _1rv'); | |
for(var i = 0;i<10;i++) | |
{ | |
a[0].value='Hey!'; | |
b = document.getElementById("u_jsonp_6_6");// The id name will probably be different from you, check it out from dev-console. | |
b.click(); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dispatch(target, eventType, char) { | |
var evt = document.createEvent("TextEvent"); | |
evt.initTextEvent (eventType, true, true, window, char, 0, "en-US"); | |
target.focus(); | |
target.dispatchEvent(evt); | |
} | |
dispatch(document.querySelector("#compose-input div"), "textInput", "hello!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(I've amended it to use Amazon.ca) | |
Things to Read: | |
Refactoring | |
Martin Fowler: Refactoring, Improving the Design of Existing Code | |
https://www.amazon.ca/Refactoring-Improving-Existing-Addison-Wesley-Technology-ebook/dp/B007WTFWJ6 | |
Jay Fields: Refactoring, Ruby Edition | |
https://www.amazon.ca/Refactoring-Ruby-Addison-Wesley-Professional-ebook/dp/B002TIOYWG/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source ~/.config/nvim/plugins.vim | |
filetype plugin indent on " load filetype-specific indent files | |
syntax enable " enable syntax processing | |
set ai " Auto indent | |
set backspace=2 | |
set cursorline " highlight current line | |
set encoding=utf8 | |
set expandtab " tabs are spaces" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filetype plugin indent on " load filetype-specific indent files | |
syntax enable " enable syntax processing | |
set nohlsearch | |
set ai " Auto indent | |
set backspace=2 | |
set cursorline " highlight current line | |
set encoding=utf8 | |
set expandtab " tabs are spaces" | |
set foldenable " enable folding |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
cookies = { | |
'hackerrankx_mixpanel_token': '272ea07a-d083-46b9-959b-87ae1fc57b2c', | |
'hackerrank_mixpanel_token': '8540fec9-da7b-477f-8ef3-843b64c89215', | |
'optimizelyEndUserId': 'oeu1472732675307r0.5341516336263654', | |
'codeagon_crp': '*nil*', | |
'interstate_v2_efa8dff896d3b51999c6e1eae8719e46b2a36441': '%7B%22user_identifier%22%3A%22289b727b-fb40-4d2b-b8bc-b34b542894c1%22%2C%22last_updated%22%3A1472732677134%2C%22utm_campaign%22%3Anull%2C%22utm_source%22%3Anull%2C%22utm_medium%22%3Anull%2C%22utm_term%22%3Anull%2C%22utm_content%22%3Anull%2C%22last_visit%22%3A1474147499833%7D', | |
'enableIntellisenseUserPref': 'true', | |
'booking-com-passions-hacked-frontend_crp': '*nil*', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import deque | |
class Solution: | |
# @param N : integer | |
# @param M : integer | |
# @param x1 : integer | |
# @param y1 : integer | |
# @param x2 : integer | |
# @param y2 : integer | |
# @return an integer |
NewerOlder