Skip to content

Instantly share code, notes, and snippets.

View wtype's full-sized avatar
🌦️
🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🦌🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲

Elliott wtype

🌦️
🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🦌🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲🌲
View GitHub Profile
@wtype
wtype / cooker.js
Last active July 14, 2023 22:54
Generate a random cook emoji of all skin tones and people types.
const cook = (() => {
const tones = ['🏻', '🏼', '🏽', '🏾', '🏿'];
const people = ['🧑', '👩', '👨'];
return () => {
const randomTone = tones[Math.floor(Math.random() * tones.length)];
const randomPerson = people[Math.floor(Math.random() * people.length)];
const cook = randomPerson + randomTone + '‍' + '🍳';
return cook;
};
})();
@wtype
wtype / find-unused-port.js
Last active July 31, 2023 22:05
Find an unused port in Node.
const net = require('net');
function findUnusedPort() {
return new Promise((resolve, reject) => {
const server = net.createServer();
// Bind to port 0 to ask the kernel to find a
// local port from a range of open addresses.
// Close the connection once a port is found.
server.listen(0, () => {
@wtype
wtype / wordcloud.py
Last active February 9, 2023 22:47
Generate a word cloud image from a URL
import matplotlib.pyplot as plt
from wordcloud import WordCloud
import requests
from bs4 import BeautifulSoup
def is_wanted_element(element):
if element.parent.name in ['style', 'script', 'head', 'title', 'meta', '[document]']:
return False
return True

Keybase proof

I hereby claim:

  • I am wtype on github.
  • I am wtype (https://keybase.io/wtype) on keybase.
  • I have a public key whose fingerprint is 2D1C 58AD 890B 9309 3100 3EA2 D726 E610 0814 9A6B

To claim this, I am signing this object:

@wtype
wtype / Ünjob.js
Last active January 15, 2021 23:31
Unpolished script to remove duplicates while searching on the /jobs/search/ section of LinkedIn. As you move from page to page, this script will highlight the jobs you have not seen while removing those you have. Each time the script has finished on the page, it will log a table of already seen, unique jobs to the console.
(() => {
console.clear();
console.log('%c Searching for duplicates... ', 'background:#8b83fc;color:black');
const seenJobs = {};
const runningInterval = 1500;
let currentPage = window.location.search;
let jobListSize = 0;
let passes = 0;