Skip to content

Instantly share code, notes, and snippets.

View smwhr's full-sized avatar

Ju/Smwhr smwhr

View GitHub Profile
@joningold
joningold / database_game.ink
Created March 1, 2025 11:11
A bare-bones implementation of the ink for a "database" style game.
The post-it note on the computer reads "Spring, 1922".
-> hub
=== hub
~ temp allFiles = LIST_ALL(Files)
- (loop)
~ temp file = pop(allFiles) // pop is an ink function from the "Ink" menu
{ Files ? file: // have you seen it? let's list the ones we've found.
@smwhr
smwhr / make_query.php
Last active October 25, 2018 08:44
SQL Query Builder v1
<?php
// spoiler !
abstract class SQLQuery{}
$sql = "SELECT * FROM user "
. " WHERE sex = :sex "
. " AND age < :age"
;
$parameters = [
@pimdh
pimdh / FF.php
Created April 24, 2012 10:33
Functional PHP Framework
<?php
function route($pattern, $controller)
{
return function($query) use($pattern, $controller) {
return (($matches = route_match($pattern, $query)) === false) ?
false :
function($registry) use($matches, $controller) {
return $controller($matches, $registry);
}
;