Skip to content

Instantly share code, notes, and snippets.

View luisherranz's full-sized avatar

Luis Herranz luisherranz

View GitHub Profile
@goetas
goetas / bench.php
Created July 9, 2014 06:30
PHP DOM XPath Test
<?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/>
@nimasdj
nimasdj / MimeTypes.php
Last active September 10, 2024 15:48
List of MimeTypes mapped to file extensions
<?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'),
@developit
developit / * Preact Compat "Lite".md
Last active September 22, 2022 15:44
a lot of libs can roll with this tiny shim.

Usage:

In your webpack config:

resolve: {
  alias: {
    'react': 'preact-compat-lite',
    'react-dom': 'preact-compat-lite'
 }
@levelsio
levelsio / gist:5bc87fd1b1ffbf4a705047bebd9b4790
Last active November 26, 2024 05:57
Secret of Monkey Island: Amsterdam (by @levelsio) or how to create your own ChatGPT image+text-based adventure game
# 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!
@adamsilverstein
adamsilverstein / interactivity-api-colab.ipynb
Last active December 4, 2024 23:43
interactivity-api-colab.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.