- Blog: http://bit.ly/181wegG
- Idealist: http://bit.ly/161gzPE (please login and try it out).
# Phone number regex. | |
`^([\+\(\)\-\d\s]+)$` | |
Matches all phone numbers including the following characters ()+- and spaces. e.g. `+ 44 (0) 75-111-57-220` | |
# Swedish postcodes. | |
`^(\d\s?){5}$` | |
# Dutch postcode | |
`^(\d\s?){4}([A-Z]\s?){2}$` |
<?php | |
// Base as in "Base" Model--others inherit from this one | |
class BaseModel extends \Illuminate\Database\Eloquent\Model | |
{ | |
public $incrementing = false; | |
protected function gen_uuid() { | |
return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', | |
// 32 bits for "time_low" | |
mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), |
var WHForm = React.createClass({ | |
handleBlur: function() { | |
this.props.commitChanges(this.state); | |
}, | |
handleChange: function(ev) { | |
var state = this.state; | |
state[ev.target.name] = ev.target.value; | |
this.setState(state); |
function interpolate(text, literals) { | |
return text.replace(new RegExp(/\$\{(\w+)\}/, "g"), function() { | |
if(arguments[1] in literals) { | |
return literals[arguments[1]]; | |
} | |
throw new Error("Literal "+arguments[1]+" doesn't exist for text replacement"); | |
}); | |
} |
# 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! |