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 { readFileSync } from "node:fs" | |
import * as babel from "@babel/core" | |
import BabelPluginReactCompiler from "babel-plugin-react-compiler" | |
import type { Plugin } from "esbuild" | |
import QuickLRU from "quick-lru" | |
export function ReactCompilerEsbuildPlugin({ | |
filter, | |
sourceMaps, | |
runtimeModulePath, |
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
.SortingHeader { | |
display: flex; | |
overflow-x: scroll; | |
gap: 18px; | |
align-items: center; | |
} | |
.MediaGrid { | |
display: grid; | |
gap: 1.5rem; |
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
#!/bin/sh | |
PROC="gnome-shell" | |
CLAMP=900 | |
PID=$(pidof "$PROC") | |
function enable() { | |
echo "Setting uclamp min to 800 (max: 1024)" | |
uclampset --pid "$PID" -m "$CLAMP" |
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
// Generates the SAPISIDHASH token Google uses in the Authorization header of some API requests | |
async function getSApiSidHash(SAPISID, origin) { | |
function sha1(str) { | |
return window.crypto.subtle.digest("SHA-1", new TextEncoder("utf-8").encode(str)).then(buf => { | |
return Array.prototype.map.call(new Uint8Array(buf), x=>(('00'+x.toString(16)).slice(-2))).join(''); | |
}); | |
} | |
const TIMESTAMP_MS = Date.now(); | |
const digest = await sha1(`${TIMESTAMP_MS} ${SAPISID} ${origin}`); |
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
// | |
// LMApiaryDeviceCrypto.h | |
// | |
// Created by Leptos on 11/18/18. | |
// Copyright © 2018 Leptos. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#define kYouTubeBase64EncodedProjectKey @"vOU14u6GkupSL2pLKI/B7L3pBZJpI8W92RoKHJOu3PY=" |
Here is our Object literal with some properties. What we need to do is calculate the average height of a set of people using JavaScript.
const data = {
"Matt": { "height" : 176, "weight": 87 },
"Jason": { "height" : 190, "weight": 103 },
"Peter": { "height" : 180, "weight": 98 }
};
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
Nymphs blitz quick vex dwarf jog. (27 letters) | |
DJs flock by when MTV ax quiz prog. (27 letters) (2 acronyms and a US spelling) | |
Big fjords vex quick waltz nymph. (27 letters) | |
Bawds jog, flick quartz, vex nymph. (27 letters) | |
Junk MTV quiz graced by fox whelps. (28 letters) (Includes proper noun) | |
Bawds jog, flick quartz, vex nymphs. (28 letters) | |
Waltz, bad nymph, for quick jigs vex! (28 letters) | |
Fox nymphs grab quick-jived waltz. (28 letters) | |
Brick quiz whangs jumpy veldt fox. (28 letters) | |
Glib jocks quiz nymph to vex dwarf. (28 letters) |
NewerOlder