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 | |
use Amp\DeferredFuture; | |
use Amp\Future; | |
use FFI\CData; | |
use Revolt\EventLoop; | |
require_once __DIR__ . '/vendor/autoload.php'; | |
$dawn = FFI::cdef(file_get_contents(__DIR__ . '/webgpu.h'), '/home/iggyvolz/dawn/build/src/dawn/native/libwebgpu_dawn.so'); |
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
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIECdYTsZKyOV1axPkMLL0egm4qaXEiYPKOhM3gtGmvbX [email protected] |
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 | |
libxml_use_internal_errors(true); | |
$dom = new DOMDocument(); | |
$dom->loadHTMLFile("https://www.rit.edu/ready/dashboard"); | |
$x = new DOMXPath($dom); | |
$alertLevel = trim($x->query("/html/body/div[3]/main/div[2]/div[4]/div[1]/div/div/div/div/div/div[3]/div/div/div/div/div/a")[0]->textContent); | |
$lastUpdate = trim($x->query("/html/body/div[3]/main/div[2]/div[4]/div[1]/div/div/div/div/div/div[4]/div/div/p/strong")[0]->textContent); | |
$newPositiveStudents = trim($x->query("/html/body/div[3]/main/div[2]/div[4]/div[2]/div/div/div/div[2]/div/div[2]/div/div/div/div/div[1]/div/p")[0]->textContent); | |
$newPositiveEmployees = trim($x->query("/html/body/div[3]/main/div[2]/div[4]/div[2]/div/div/div/div[2]/div/div[2]/div/div/div/div/div[2]/div/p")[0]->textContent); | |
$totalPositiveStudents = trim($x->query("/html/body/div[3]/main/div[2]/div[4]/div[2]/div/div/div/div[2]/div/div[4]/div/div/div/div/div[1]/div/p")[0]->textContent); |
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
#define _GNU_SOURCE | |
#define _XOPEN_SOURCE 500 /* See feature_test_macros(7) */ | |
#include <ftw.h> | |
#include<stdio.h> | |
#include <string.h> | |
#include <sys/time.h> | |
#include <time.h> | |
#include <unistd.h> | |
struct timespec start; | |
int argc; |
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
#define _GNU_SOURCE | |
#define _XOPEN_SOURCE 500 /* See feature_test_macros(7) */ | |
#include <ftw.h> | |
#include<stdio.h> | |
#include <string.h> | |
#include <sys/time.h> | |
#include <time.h> | |
#include <unistd.h> | |
struct timespec start; | |
int argc; |
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 | |
use GCCISWebProjects\Utilities\DatabaseTable\PDOMysqlDriver; | |
use GCCISWebProjects\Utilities\DatabaseTable\Condition\AlwaysTrueCondition; | |
require_once __DIR__ . "/../../vendor/autoload.php"; | |
$db = new PDOMysqlDriver("/tmp/mysql.sock"); | |
$db->query("USE gwp;"); | |
foreach(array_map(fn(array $x):string => $x[0], iterator_to_array($db->query("SHOW TABLES"))) as $table) { | |
$data = (iterator_to_array($db->query("SELECT * FROM `$table`"))); | |
// Take out integer keys |
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
zend_extension=opcache.so | |
opcache.enable=1 | |
opcache.enable_cli=1 | |
extension=parallel.so | |
opcache.preload=preloaded.php |
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
zend_extension=opcache.so | |
opcache.enable=1 | |
opcache.enable_cli=1 | |
extension=parallel.so | |
opcache.preload=preloaded.php |
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 | |
function getAllParents(ReflectionClass $refl):array | |
{ | |
return array_unique(iterator_to_array(getAllParentsIt($refl))); | |
} | |
function getAllParentsIt(ReflectionClass $refl):Iterator | |
{ | |
if($parent = $refl->getParentClass()) { | |
yield $parent; |
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
# Run the registry with: | |
# docker run -d -p 5000:5000 registry | |
DOCKER="127.0.0.1:5000" | |
test "`curl -sS $DOCKER/v2/`" == "{}" || { echo "Docker registry not found on $DOCKER"; echo "Try running it with docker run -d -p 5000:5000 registry"; exit 1; } | |
get() { | |
echo "Getting $1" | |
mkdir -p `dirname $1` | |
curl -Ss http://$DOCKER/$1 > $1 | |
} |
NewerOlder