Skip to content

Instantly share code, notes, and snippets.

🎄
ran out of fucks.

Adam Klvač adawolfa

🎄
ran out of fucks.
Block or report user

Report or block adawolfa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@adawolfa
adawolfa / tps_meter.php
Last active Nov 8, 2019
Ticks per second meter for ReactPHP
View tps_meter.php
<?php
declare(strict_types=1);
/**
* Reports ticks per second to STDERR.
*
* Note that this function saturates event loop significantly with precision of zero and slows it down quite a lot,
* as it registers a callback on each tick. Because the event loop will be unable to sleep, CPU time consumption
* raises up to 100 %.
View bitmask.lua
-- magic happens here
local function n2b(number)
local bits = {}
if number < 1 then
return bits
end
local i = 1
View q3-colors.php
<?php const COLORS = [
0x000000 => '0Pp°Ðð',
0xff0000 => '1Qq±Ññ',
0x00ff00 => '2Rr²Òò',
0xffff00 => '3Ss³Óó',
0x0000ff => '4TtŽÔô',
0x00ffff => '5UuµÕõ',
0xff00ff => '6Vv¶Öö',
0xffffff => '7Ww·×÷',
0xff7f00 => '8XxžØø',
View say.log
-- This was in console.
{
message = string(13) "!altnames xxx"
type = string(3) "say"
argc = number(3)
argv = {
1 = string(9) "!altnames"
2 = string(3) "xxx"
3 = string(0) ""
}
View conexec.cfg
PLAYERS < 4 {
set team_maxMines 0
set team_maxRiflegrenades 0
set g_doWarmup 1
}
PLAYERS >= 4 and PLAYERS < 6 {
set team_maxMines 2
set team_maxRiflegrenades 1
set g_doWarmup 1
View conexec.lua
-- Conditional commands execution.
-- Author: adawolfa
-- Global variables are exposed to configuration file.
PLAYERS = 0
SPECTATORS = 0
MAPNAME = "none"
MAPTIME = 0
local rules = {}
View etconsole-restore.cpp
#include <iostream>
#include <Windows.h>
BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
{
char title[256];
GetWindowText(hWnd, title, sizeof(title));
if (strcmp(title, "ET Console") == 0) {
ShowWindow(hWnd, SW_SHOWNA);
View fsk-custom.lua
-------------------- Configuration --------------------
-- Defines delay before issuing a warning [seconds].
-- Default: 180 (3 minutes)
WarnTime = 180
-- Defines interval between warning and kick [seconds].
-- Default: 60 (1 minute)
KickTime = 60
-- Warning message text.
WarningMessage = "^7Server is full, please join a team or you might get kicked."
-- Shrubbot file.
View cat.php
<?php
cat(STDOUT);
function cat($stream, int $indent = 0)
{
$i = str_repeat(' ', max($indent, 0));
fwrite($stream, <<<CAT
$i ,
@adawolfa
adawolfa / fsk.lua
Last active Dec 22, 2018
Full server spectator kicker
View fsk.lua
-------------------- Configuration --------------------
-- Defines delay before issuing a warning [seconds].
-- Default: 180 (3 minutes)
WarnTime = 180
-- Defines interval between warning and kick [seconds].
-- Default: 60 (1 minute)
KickTime = 60
-- Warning message text.
WarningMessage = "^7Server is full, please join a team or you might get kicked."
-- Shrubbot file.
You can’t perform that action at this time.