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
local client = require('discordia').Client() | |
local allowableRoles = {{"681281731869147208", "He/Him"}, {"681281755080294443", "She/Her"}, {"681281780220690520", "They/Them"}} | |
client:on('messageCreate', function(message) | |
for i=1,3 do | |
local id, name = unpack(allowableRoles[i]) | |
if message.content == "!pronouns "..name then | |
local member = message.member | |
if not member then break end |
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 | |
require __DIR__.'/vendor/autoload.php'; | |
use GDText\Box; | |
use GDText\Color; | |
define("DEBUG", false); | |
if(DEBUG) { | |
header("Content-Type: text/plain"); | |
} else { | |
header("Content-Type: image/png"); |
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 \parallel\Runtime; | |
use \parallel\Channel; | |
$runtime = new Runtime(); | |
Channel::make("TEST_CHANNEL", 1024); | |
$future1 = $runtime->run(function(){ | |
$channel = Channel::open("TEST_CHANNEL"); | |
sleep(2); | |
$channel->send("foo"); | |
sleep(1); |
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 | |
declare(strict_types = 1); | |
use iggyvolz\DocBlockParser\Tag; | |
use iggyvolz\DocBlockParser\Subtag; | |
use iggyvolz\DocBlockParser\DocBlockParser; | |
require_once __DIR__."/../vendor/autoload.php"; | |
/** | |
* fin | |
* bax @foo bar bak @bin bar @boo bay @boo yak |
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 get_thing_might_be_null():?int | |
{ | |
return 7; | |
} | |
{ | |
if($foo = get_thing_might_be_null() && $foo > 5) { | |
echo "hello world"; | |
} | |
} |
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 | |
namespace foo{ | |
class y | |
{ | |
} | |
} | |
namespace bar{ | |
use foo\y; | |
use phpDocumentor\Reflection\Types\ContextFactory; |
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
Store the testbench data in a csv file. First column should be the signal names, second column the lengths, remaining columns signals to test |
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
// https://gist.github.com/yoavweiss/b1f798bb2be4e671107b#file-preload_feature_detection-js | |
const supportsPreload = (function() { | |
try { | |
return document.createElement("link").relList.supports('preload'); | |
} catch (e) { | |
return false; | |
} | |
}()); | |
if (supportsPreload) { | |
console.log("Supports preload"); |
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
# Install build dependencies for 64-bit | |
sudo apt update | |
sudo apt install -y build-essential autotools-dev autoconf debhelper docbook-to-man docbook-utils docbook-xsl fontforge libacl1-dev libasound2-dev libavcodec-dev libcapi20-dev libcups2-dev libdbus-1-dev libfontconfig1-dev libfreetype6-dev libgl1-mesa-dev libglu1-mesa-dev libgnutls28-dev libgphoto2-dev gcc-8 libgsm1-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgtk-3-dev libice-dev libkrb5-dev liblcms2-dev libldap2-dev libldap-dev libmpg123-dev libncurses5-dev libopenal-dev libosmesa6-dev libpcap-dev libpulse-dev libsane-dev libsdl2-dev libssl-dev libudev-dev libv4l-dev libva-dev libxcomposite-dev libxcursor-dev libxi-dev libxinerama-dev libxml2-dev libxrandr-dev libxrender-dev libxslt1-dev libxt-dev prelink sharutils unixodbc-dev bison flex gawk quilt rdfind symlinks gperf systemtap-sdt-dev libaudit-dev libcap-dev libselinux-dev g++-8-multilib | |
mkdir ~/build | |
# Download and build glibc | |
cd ~/build | |
wget http://archive.ubuntu.com/ubuntu/pool/ |
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
# Install dependencies | |
sudo apt install schroot debootstrap | |
# Setup chroot | |
echo "[ubuntu_i386]"|sudo tee -a /etc/schroot/chroot.d/ubuntu_i386.conf | |
echo "description=Ubuntu Release 32-Bit"|sudo tee -a /etc/schroot/chroot.d/ubuntu_i386.conf | |
echo "personality=linux32"|sudo tee -a /etc/schroot/chroot.d/ubuntu_i386.conf | |
echo "directory=$PWD"|sudo tee -a /etc/schroot/chroot.d/ubuntu_i386.conf | |
echo "root-users=$USER"|sudo tee -a /etc/schroot/chroot.d/ubuntu_i386.conf | |
echo "type=directory"|sudo tee -a /etc/schroot/chroot.d/ubuntu_i386.conf | |
echo "users=$USER"|sudo tee -a /etc/schroot/chroot.d/ubuntu_i386.conf |