Skip to content

Instantly share code, notes, and snippets.

View luisherranz's full-sized avatar

Luis Herranz luisherranz

View GitHub Profile
@levelsio
levelsio / gist:5bc87fd1b1ffbf4a705047bebd9b4790
Last active February 10, 2024 10:54
Secret of Monkey Island: Amsterdam (by @levelsio) or how to create your own ChatGPT image+text-based adventure game
View gist:5bc87fd1b1ffbf4a705047bebd9b4790
# 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!
@developit
developit / * Preact Compat "Lite".md
Last active September 22, 2022 15:44
a lot of libs can roll with this tiny shim.
View * Preact Compat "Lite".md

Usage:

In your webpack config:

resolve: {
  alias: {
    'react': 'preact-compat-lite',
    'react-dom': 'preact-compat-lite'
 }
@nimasdj
nimasdj / MimeTypes.php
Last active April 2, 2023 22:21
List of MimeTypes mapped to file extensions
View MimeTypes.php
<?php
// I made this array by joining all the following lists + .php extension which is missing in all of them.
// please contribute to this list to make it as accurate and complete as possible.
// https://gist.github.com/plasticbrain/3887245
// http://pastie.org/5668002
// http://pastebin.com/iuTy6K6d
// total: 1223 extensions as of 16 November 2015
$mime_types = array(
'3dm' => array('x-world/x-3dmf'),
'3dmf' => array('x-world/x-3dmf'),
@goetas
goetas / bench.php
Created July 9, 2014 06:30
PHP DOM XPath Test
View bench.php
<?php
$xml = new DOMDocument();
$xml->loadXML('
<a xmlns="http://www.aaa.bbb.cc/xx">
<b/>
<b xmlns:x="http://www.aaa.bbb.cc/xxyy">
<c xml:id="c" aa="a" bb="bb" xmlns:c="http://www.aaa.bbb.cc/xx">
<c:d/>