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
# 2023-11-27 MIT LICENSE | |
Here's the open source version of my ChatGPT game MonkeyIslandAmsterdam.com. | |
It's an unofficial image+text-based adventure game edition of Monkey Island in Amsterdam, my home town. | |
Please use it however you want. It'd be nice to see more ChatGPT-based games appear from this. If you get inspired by it, please link back to my X https://x.com/levelsio or this Gist so more people can do the same! | |
Send me your ChatGPT text adventure game on X, I'd love to try it! |
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
// | |
// ContentView.swift | |
// coremlsd2test | |
// | |
// Created by Yasuhito Nagatomo on 2022/12/03. | |
// | |
// A sample code using Apple/ml-stable-diffusion library. | |
// Preparation: | |
// 1. convert the PyTorch Stable-Diffusion v2 model to coreml models using Apple's tools. | |
// 2. import the coreml models into the iOS project. |
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 invariant from "tiny-invariant"; | |
class AmalgoBox extends HTMLElement { | |
get input() { | |
return this.querySelector("input") as HTMLInputElement; | |
} | |
get button() { | |
return this.querySelector("button") as HTMLButtonElement; | |
} |
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 SwiftUI | |
import PlaygroundSupport | |
struct Sunset: View { | |
@State var backgroundColor = Color.blue | |
@State var sunSetted = false | |
let sunGradient = [Color.yellow, Color.orange] | |
let moonGradient = [Color.gray, Color.black] | |
@State var alignment = Alignment.top | |
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
// Backend | |
import formidable from 'formidable'; | |
export const config = { | |
api: { | |
bodyParser: false, | |
}, | |
}; | |
export default async (req, res) => { |
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
add_action('graphql_register_types', function() { | |
$post_types = WPGraphQL::$allowed_post_types; | |
if (!empty($post_types) && is_array($post_types)) { | |
foreach($post_types as $post_type) { | |
$post_type_object = get_post_type_object($post_type); | |
register_graphql_field($post_type_object->graphql_single_name, 'styledContent', [ | |
'type' => 'String', | |
'description' => __('The styled elementor content of the page', 'cottontailpress-headless'), | |
'resolve' => function($post) { | |
$content = ''; |
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 React, { Component } from "react"; | |
import axios from "axios"; | |
import * as config from "../config.json"; | |
import _ from "lodash"; | |
import { StatusBar } from "@uppy/react"; | |
import { DragDrop } from "@uppy/react"; | |
import "@uppy/core/dist/style.css"; | |
import "@uppy/drag-drop/dist/style.css"; | |
import "@uppy/status-bar/dist/style.css"; | |
import "./s3uploadComponent.css"; |
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 React, { useState, useEffect } from 'react'; | |
export default () => { | |
// Definimos los estados | |
const [name, setName] = useState(String) | |
const [count, setCount] = useState(Number) | |
// Los estados definidos se pueden usar dentro de otras funciones | |
function obtenerName(){ | |
console.log(name) |
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
<?php | |
function pwa_preview_link() { | |
$slug = basename(get_permalink()); | |
$pwadomain = 'https:/example.com'; | |
$pwadir = '/'; | |
$pwaurl = "$pwadomain$pwadir$slug"; | |
return "$pwaurl"; | |
} | |
add_filter('preview_post_link', 'pwa_preview_link'); |
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
/************************************************ | |
Audio Blocks | |
************************************************/ | |
.wp-block-audio { | |
margin-left: 0px; | |
margin-right: 0px; | |
} | |
.wp-block-audio audio { | |
width: 100%; |
NewerOlder