Skip to content

Instantly share code, notes, and snippets.

const nums = [ 9, 8, 6, 6, 6, 5, 4, 2, 0, 0 ];
function findClosest(nums, target) {
const options = nums.reduce((acc, val) => {
acc[val] ??= 0;
acc[val] += 1;
return acc;
}, {});
let max = 0, digits = null;
#!/usr/bin/env python3
import asyncio
import iterm2
async def main(connection):
async with iterm2.VariableMonitor(connection, iterm2.VariableScopes.APP, "effectiveTheme", None) as mon:
while True:
# Block until theme changes
theme = await mon.async_get()
<!DOCTYPE html>
<html>
<head>
<title>Rock Paper Scissors Checker</title>
</head>
<body>
<h1>Step 1: Complete this logic chart</h1>
<p> Hint: In the HTML look for #completeLogicOne and #completeLogicTwo to find where you can write the results.</p>
<!DOCTYPE html>
<html>
<head>
<title>Rock Paper Scissors Checker</title>
</head>
<body>
<p>
Player1: <input id="player-1">
</p>
<p>
@xavi-
xavi- / index.html
Last active February 2, 2017 08:55
Exported from Popcode. Click to import: https://popcode.org/?gist=5a041b6793be7561431a8dcf5dcab99e
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1 class="hi">hi</h1>
<div id="container">
<div class="hi">hi</div>
<div class="hey">hey</div>
@xavi-
xavi- / index.html
Last active February 1, 2017 14:30
Exported from Popcode. Click to import: https://popcode.org/?gist=7bf4bd4a93d13451ca50e4bdb6f871aa
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1 class="hi">hi</h1>
<div id="container">
<p class="hi">hi</p>
<p class="hey">hey</p>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div id="intro">
<h1>My Favorites</h1>
<p>This webapge has some of my <em>most favorite</em> things in the <strong>world</strong>!</p>
</div>
@xavi-
xavi- / index.html
Last active February 1, 2017 13:41
Exported from Popcode. Click to import: https://popcode.org/?gist=41b80affc98840bdbc9c8f572e4b2ba5
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div id="intro">
<h1>My Favorites</h1>
<p>This webapge has some of my <em>most favorite</em> things in the <strong>world</strong>!</p>
</div>
@xavi-
xavi- / index.html
Last active February 1, 2017 12:37
Exported from Popcode. Click to import: https://popcode.org/?gist=f9498403a9f01a9ab45c03250f9aad93
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>My Favorites</h1>
<p>This webapge has some of my <em>most favorite</em> things in the <strong>world</strong>!</p>
<div id="favorites">
<div>
@xavi-
xavi- / index.html
Last active January 31, 2017 21:43
Exported from Popcode. Click to import: https://popcode.org/?gist=d101bbe864a2f49ddcdd014eac467fda
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>About Zozo</h1>
<img src="https://raw.githubusercontent.com/xavi-/random/master/zozo.jpg">
<p>
Zozo is darling puppy known for sparkling personality and cute face. She loves burrowing under blankets and chewing on stuffed animals.