This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php # TweetMVC Example App Bootstrap | |
# Import TweetMVC using error suppression to hide notices and warnings from the cold golfing | |
@include 'tmvc.php'; | |
use TMVC\Cor\A; | |
# Basic namespaced autoloader, nothing too fancy | |
spl_autoload_register(function($class) {return @include __DIR__.'/src/'.strtr($class, '\\', '/').'.php';}); | |
# Instantiate, configure, and execute the app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Marlin 3D Printer Firmware | |
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] | |
* | |
* Based on Sprinter and grbl. | |
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"backcolor": "#666666", | |
"name": "GLT-KB-E-1-R", | |
"author": "Geeklab Technologies", | |
"switchMount": "cherry", | |
"switchBrand": "cherry", | |
"pcb": true, | |
"plate": false | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Pagination of a MySQL query ordered by non-unique values benchmark: | |
// The normal way with limit/offset. | |
// Grabbing all the id's and then doing the queries w/ groups of ids. | |
// This uses the MySQL employee example DB: https://dev.mysql.com/doc/employee/en/ | |
function get_time() { | |
list($usec, $sec) = explode(' ', microtime()); | |
return ((float)$usec + (float)$sec); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Support Color Markdown | |
data = data.replace(/\{color fg:(White|Black|Blue|Green|Red|Brown|Purple|Orange|Yellow|LightGreen|Cyan|LightCyan|LightBlue|PinkGray|LightGray)\}([^{]+)\{\/color\}/img, '<span style="color:$1;">$2</span>'); | |
data = data.replace(/\{color bg:(White|Black|Blue|Green|Red|Brown|Purple|Orange|Yellow|LightGreen|Cyan|LightCyan|LightBlue|PinkGray|LightGray)\}([^{]+)\{\/color\}/img, '<span style="background-color:$1;">$2</span>'); | |
data = data.replace(/\{color fg:(White|Black|Blue|Green|Red|Brown|Purple|Orange|Yellow|LightGreen|Cyan|LightCyan|LightBlue|PinkGray|LightGray) bg:(White|Black|Blue|Green|Red|Brown|Purple|Orange|Yellow|LightGreen|Cyan|LightCyan|LightBlue|PinkGray|LightGray)\}([^{]+)\{\/color\}/img, '<span style="color:$1; background-color:$2;">$3</span>'); | |
data = data.replace(/\{color bg:(White|Black|Blue|Green|Red|Brown|Purple|Orange|Yellow|LightGreen|Cyan|LightCyan|LightBlue|PinkGray|LightGray) fg:(White|Black|Blue|Green|Red|Brown|Purple|Orange|Yellow|LightGreen|Cyan|LightCyan|LightBl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
SQLyog Community v8.3 | |
MySQL - 5.1.36-community-log : Database - x5 | |
********************************************************************* | |
*/ | |
/*!40101 SET NAMES utf8 */; | |
/*!40101 SET SQL_MODE=''*/; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tbla idx1 b,e,f | |
SELECT a.* | |
FROM tblA a | |
INNER JOIN tblB b ON a.id = b.aId | |
WHERE a.b IN (1,2,3) | |
AND (a.c IN (3,4,5) OR a.d IS NOT NULL) | |
AND a.e = 0 | |
AND a.f = 0 | |
ORDER BY a.g ASC |
# RFC: Universal Serial Device Communication Protocol (USDCP)
## Introduction:
This document describes the Universal Serial Device Communication Protocol (USDCP), a standard communication protocol for serial devices. The purpose of this protocol is to provide a standardized format for requesting and receiving data from serial devices. The protocol defines the structure of request and response packets, and also provides specific definitions for certain requests and their responses.
USDCP supports three baud rates: 115,200, 9600, and 1200, with 115,200 being the default.
## Packet/Frame Structures:
USDCP request and response packets consist of the following fields:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include 'vendor/autoload.php'; | |
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode; | |
use PHPStan\PhpDocParser\Ast\PhpDoc\ReturnTagValueNode; | |
use PHPStan\PhpDocParser\Ast\Type\ArrayTypeNode; | |
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode; | |
use PHPStan\PhpDocParser\Ast\Type\IntersectionTypeNode; | |
use PHPStan\PhpDocParser\Ast\Type\UnionTypeNode; |
OlderNewer