Skip to content

Instantly share code, notes, and snippets.

View foxfabi's full-sized avatar

Fabian Dennler foxfabi

View GitHub Profile
@foxfabi
foxfabi / ComposerPHPUnit.md
Created March 2, 2022 15:21 — forked from GaryRogers/ComposerPHPUnit.md
Getting Composer and PHPUnit to autoload namespaces

Getting Composer and PHPUnit to autoload namespaces.

Overview

Details

Project Structure

ProjectRoot
 src
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Vue.js Examples</title>
</head>
<body>
<div id="app">
<h1>Vue.js Examples</h1>
<!-- PUT YOUR VUE.JS CONTENT HERE -->
@foxfabi
foxfabi / ExtractCFrames.js
Created April 24, 2021 11:49
Return the CoordinateFrame (CFrame) elements extracted from a Roblox XML file (*.rbxmx) as JSON Array
/**
* Return the CoordinateFrame elements extracted
* from a Roblox XML file (*.rbxmx) as JSON Array.
*
* Models often consist of one part that is used several times
* and usually differ only in position and orientation.
* By extracting the CoordinateFrame from the model, it is now
* possible with a LUA script to clone the underlying part
* and place it dynamically at the desired location.
*
@foxfabi
foxfabi / database.class.php
Last active January 26, 2021 14:53
Simple MySQLi Database class for PHP7
<?php
/**
* Simple MySQLi Database class for PHP7.
* The class contains main functions for your database.
*
* @author FD
*/
class Database
@foxfabi
foxfabi / entity.class.php
Last active February 17, 2021 16:08
PHP Entity class providing CRUD operations for a database table
<?php
/**
* Generate an entity object that provide CRUD operation for a database table.
*
* Some examples:
*
* // New Instance
* $users = new Entity($link, "users");
*
<?php
$url = "https://randomname.de/";
$params = array(
"count" => "1", // gewünschte Anzahl der Resultate
"gender" => "b", // männliche und weibliche User generieren
"minAge" => "18", // minimale Alter der Nutzer
"format" => "json" // Typ des Ausgabeformat
);
<?php
/*******************************************************
* Author: Fabian Dennler <fabian.dennler@zli.ch>
* Released: 2020.11.02
*******************************************************
* Checkliste der Anforderungen
* ✔️ Dateisystem verwenden (optional)
* ✔️ Typenfunktionen verwenden
* ✔️ Reguläre Ausdrücke verwenden (optional)
<?php
/**
* Draws a christmas tree
*
* Author: Fabian Dennler
*/
$repeat = 3; // Amount of stages
print("Zeichen: ");
@foxfabi
foxfabi / WWTBAM.php
Created September 25, 2020 09:54
PHP Quiz: Who Wants to Be a Millionaire?
<?php
/**
* WWTBAM: Who Wants to Be a Millionaire?
*
* At the end of this file you will find the JSON data structure.
*
* Author: Fabian Dennler
*/
$playing = true; // Flag to check if game is running