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
for key, value in object_1.items(): | |
if object_2[key] != value: | |
outliers[key] = {"object_1" : object_2[key], "object_2": value} |
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
# Summing via Anonymous Function | |
import dis | |
dis.dis(lambda x, y: x+y) | |
# output - using Python v.3.10.2 | |
1 0 LOAD_FAST 0 (x) | |
2 LOAD_FAST 1 (y) | |
4 BINARY_ADD |
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 dis | |
dis.dis(lambda x, y: x+y) | |
# outputs | |
1 0 LOAD_FAST 0 (x) | |
2 LOAD_FAST 1 (y) | |
4 BINARY_ADD | |
6 RETURN_VALUE |
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
# | |
# Cobalt2 Theme - https://github.com/wesbos/Cobalt2-iterm | |
# | |
# # README | |
# | |
# In order for this theme to render correctly, you will need a | |
# [Powerline-patched font](https://gist.github.com/1595572). | |
## | |
### Segment drawing | |
# A few utility functions to make it easy and re-usable to draw segmented prompts |
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
let objB = {id : '123', name: 'JZ', craving: 'burgers'}; | |
(({id, ...others }) => ({...others}))(objB); |
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
<!-- NOTES: | |
- These forms may not necessarily cover all fields required for a custom account signup, and should be considered a work in progress (at least until I get this working and can confirm they suffice) | |
- The country lists below are ISO-3166-1 Alpha-2 compliant. They make up fairly large chunks of the follow code. Would recommend exporting to a separate file and including as needed. | |
- I've included Bootstrap styling for easier organisation, but apply styling as needed. --> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
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
// FIRST ADD ID OF CHOICE (IN MY CASE 'bob' TO THE LIST YOU WISH TO UNTICK) | |
var a = document.getElementById('bob') | |
[...a.querySelectorAll('.gdpr-checkbox')].forEach(box => { | |
box.getElementsByTagName('input')[0].checked = false; | |
}) | |
//The site seems to have a script that re-ticks all boxes from time to time, so be sure to click the submit button with | |
//your console open and all boxes unticked |
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.querySelectorAll('a.ad_takeover')].forEach(ad => ad.style.visibility = 'hidden'); | |
document.getElementById('widget_careers').style.visibility = 'hidden' |
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
//Run on LinkedIn's "Manage Invitations" page in your browser Console. Will Accept anyone except for those with a recruitment or consultant-related headline | |
//(Add your own filters to cover more terms) | |
[...document.querySelectorAll('.invitation-card')].forEach(card => { | |
const headline = card.querySelector('.invitation-card__occupation').textContent; | |
const acceptBtn = card.querySelector('button[data-control-name="accept"]'); | |
const name = card.querySelector('.invitation-card__name').textContent; | |
if (headline.match(/recruit/gi) || headline.match(/consult/gi)) { | |
console.log(`I'll pass on ${name} 🙉`) |