Skip to content

Instantly share code, notes, and snippets.

@tykurtz
tykurtz / grokking_to_leetcode.md
Last active March 28, 2024 15:29
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@mono0926
mono0926 / commit_message_example.md
Last active March 28, 2024 15:29
[転載] gitにおけるコミットログ/メッセージ例文集100
@0xdevalias
0xdevalias / _deobfuscating-unminifying-obfuscated-web-app-code.md
Last active March 28, 2024 15:28
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
@cassidoo
cassidoo / base-css.md
Created May 4, 2022 06:37
Base CSS for a plain HTML document

If you don't want to deal with styling a mostly text-based HTML document, plop these lines in and it'll look good:

html {
  font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  font-size: 1.3em;
  max-width: 40rem;
  padding: 2rem;
  margin: auto;
 line-height: 1.5rem;
@monokee
monokee / define-component.js
Last active March 28, 2024 15:27
Tiny customElement wrapper that enables scalable web component architecture. Define custom elements with a configuration object that separates markup from css and javascript. Uses a slotted light DOM (no shadow DOM) to allow for powerful component extension, composition and easier styling with external stylesheets and global css variables. Expor…
/**
* Tiny customElement wrapper that enables scalable web component architecture.
* Define custom elements with a configuration object that separates markup from css and javascript.
* Uses a slotted light DOM (no shadow DOM) to allow for powerful component extension,
* composition and easier styling with external stylesheets and global css variables.
* Exports a component class that can be imported and explicitly used to be picked up by module bundlers.
* See comments for examples and GNU license below.
*/
export function defineComponent(name, config) {
import { Context, HonoRequest, Next } from "hono";
import { validateFramesPost } from "@xmtp/frames-validator";
export const xmtpSupport = async (c: Context, next: Next) => {
await next();
const isFrame = c.res.headers.get("content-type")?.includes("html");
if (!isFrame) return;
if (!(await isXMTP(c.req))) return;
@neelbhanushali
neelbhanushali / usb-connected-hand-held-barcode-scanner-input.js
Last active March 28, 2024 15:25
Javascript for detecting usb connected - hand held - barcode scanner input
// Author: Neel Bhanushali <neal.bhanushali@gmail.com>
document.addEventListener('keydown', function(e) {
// add scan property to window if it does not exist
if(!window.hasOwnProperty('scan')) {
window.scan = []
}
// if key stroke appears after 10 ms, empty scan array
if(window.scan.length > 0 && (e.timeStamp - window.scan.slice(-1)[0].timeStamp) > 10) {
window.scan = []
@assafmo
assafmo / index.html
Last active March 28, 2024 15:24
SEO
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- SEO Title -->
<meta name="application-name" content="$SHORT_TITLE" />
<meta name="title" content="$TITLE" />
@karolsteve
karolsteve / FormDataHandler.java
Created March 28, 2024 15:23 — forked from JensWalter/FormDataHandler.java
FormDataHandler for com.sun.net.httpserver.HttpHandler
package io.trivium.glue.binding.http;
import com.sun.net.httpserver.Headers;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
@matfax
matfax / .zshrc
Created March 6, 2023 13:38
Sudo authentication with Windows 1Password CLI on Ubuntu WSL
# ....
alias sudo="sudo -A"