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
APP_NAME="bash"; COOKIE_STR="$(cat ~/.uploadthingcookie)"; \ | |
JWT="$(curl -Ss \ | |
'https://clerk.uploadthing.com/v1/client/sessions/sess_2dW3vhIqxSNMjfSOZnFoDgWHYfZ/tokens?_clerk_js_version=4.70.3' \ | |
-X 'POST' \ | |
-H 'authority: clerk.uploadthing.com' \ | |
-H 'accept: */*' \ | |
-H 'accept-language: en-US,en;q=0.9' \ | |
-H 'content-length: 0' \ | |
-H 'content-type: application/x-www-form-urlencoded' \ | |
-H "$COOKIE_STR" \ |
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
#!/usr/bin/env bash | |
function house_builder() { | |
# floors,rooms,has_garage | |
echo "0,0,0" | |
} | |
function set_field() { | |
local f r g | |
IFS=, read f r g |
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
htmx_page <<-EOF | |
<script> | |
window.addEventListener("DOMContentLoaded", () => { | |
htmx.trigger("#thing", "myEvent", {answer : 42}); | |
}); | |
</script> | |
<div id="thing" hx-trigger="myEvent" hx-post="/test"></div> | |
EOF |
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/bash | |
cd /var/lib/docker/volumes/root_ld54volume/_data | |
list_scores() { | |
for LEVEL in {0..14}; do | |
SCORE_AND_USER=$(sort $LEVEL -n | head -1) | |
SCORE=$(echo "$SCORE_AND_USER" | cut -d' ' -f1) | |
USER=$(echo "$SCORE_AND_USER" | cut -d' ' -f2) | |
FREQ=$(sort -u "$LEVEL" | grep -c '^'"$SCORE ") |
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
/////////////////////////// | |
// Client | |
/////////////////////////// | |
// when the user clicks the 'login with twitch' button... | |
document.location = | |
`https://id.twitch.tv/oauth2/authorize` + | |
`?client_id=${TWITCH_CLIENT_ID}` + | |
`&redirect_uri=${redirect}` + | |
`&response_type=token`; |
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
// try it out here: https://codesandbox.io/s/recursing-meadow-t87lvp?file=/src/index.js | |
export const machine = createMachine( | |
{ | |
id: "fizzbuzz", | |
context: { | |
i: "0" | |
}, | |
initial: "Start", | |
states: { |
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
#include <stdio.h> | |
#include <stdlib.h> | |
// boilerplate; ignore this part | |
#define loop(x) for(int _i=x;_i<=0x64;_i+=x) | |
#define i c+(_i-1)*012 | |
#define pn sprintf(i,"%d\n",_i) | |
#define ps(s) strcpy(i,#s"\n") | |
#define say(s) strcmp(#s,"Number")?ps(s):pn |
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
// Paste in your rollycubes.com console to unleash the rolly bot | |
let speedMult = 1; | |
let unsubscribe; | |
if (unsubscribe) unsubscribe(); | |
let lut={22:2,23:2,24:4,25:4,26:6,27:4,28:6,29:2,30:4,32:2,34:2,36:4,37:2,38:6, | |
39:4,40:6,41:4,42:4,43:2,44:2,48:2,49:2,50:2,51:2,52:2,53:4,54:4,55:4,56:4,57:6, | |
58:8,59:10,60:10,61:10,62:8,63:6,64:4,65:2,66:2,67:2,68:2,69:4,70:6,71:8,72:10, | |
73:10,74:10,75:8,76:6,77:4,78:2,82:2,83:2,84:2,85:4,86:4,87:4,88:4,89:8,90:10, | |
91:14,92:14,93:14,94:12,95:12,96:6,97:6,98:2,99:2,100:2,101:6,102:6,103:12,104:12, |
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
// Takes in a movement vector and moves the cursor | |
static void moveHelper(ALevelEditorPawn* t, FVector v) { | |
if (!t->cursorLocation.Z && v.Z < 0) v.Z = 0; // Min floor | |
// Adjust input vector for camera rotation | |
AController* controller = t->GetController(); | |
if (controller) { | |
FRotator rot = controller->GetControlRotation(); | |
UE_LOG(LogTemp, Warning, TEXT("Rotation: %d"), (int)rot.Yaw); | |
if (rot.Yaw > 45 && rot.Yaw <= 135) { |
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
<!doctype html> | |
<html> | |
<head> | |
<style> | |
* { | |
margin: 0; | |
overflow: hidden; | |
} |
NewerOlder