This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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; | |
| } |
This file contains hidden or 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> | |
| <title>Minecraft Skin Exploder</title> | |
| </head> | |
| <script type="text/javascript"> | |
| const maskdata = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAZhJREFUeJztm71KA0EURjPaiJAmgitiYbWY3iewsNQm2FjZiZBewVLQUhDFTgR/QFL5HBaCxYattNIFkyYidmstCXcIN3DA/U6dO3P4uLOZ2UlCLcLC4VwZ+4zFx1EveOrLi6Zr/rCXmfNPeQb/DygAWoBGAdACNAqAFqAJ3u95L++L8+T06gAFQAvQKABagEYB0AI0Q2fl9Kww9wV5OzHP143VLde+ov/0YI5frKTm+Ek3H+v9Q+U7QAHQAjQhtuZjfF63J+Uykuzr2VUfeyZUvgMUAC1AowBoARoFQAvQKABagEYB0AI0Q/vkRr1lng36g465ty6bP777/GzGHP929socf/t7R+8DxkEB0AI0IbbmY/SWbiblMpK7t3tXfeyZUPkOUAC0AI0CoAVoFAAtQKMAaAEaBUAL0Aztk+utDfNsMOg8mnvr18K+v19O7Lu6tLD/H5An9u//dw/2zfrL45M/9ZXvAAVAC9CE2JqP8XLedQms16Zd9Wunm676yneAAqAFaBQALUCjAGgBGgVAC9AoAFqA5heamUiO3GpTvwAAAABJRU5ErkJggg=="; | |
| const old_colormap = { | |
| "left_arm": "#e92826", |