Skip to content

Instantly share code, notes, and snippets.

@devilesk
devilesk / normalize.sh
Last active October 11, 2019 11:43
Normalize tabs and spaces in stripper configs and mapinfos
#!/bin/bash
# edits to stripper cfgs and mapinfo.txt files
FILES=$(find cfg/stripper -type f -name '*.cfg' & find . -type f -name 'mapinfo.txt')
for a in $FILES
do
# remove leading html
sed -e's/^<.*>//' $a >$a-nohtml
mv $a-nohtml $a
# remove trailing whitespace
@devilesk
devilesk / l4d_tank_rush.sp
Last active September 30, 2019 00:25
L4D2 No Tank Rush Fixed
#pragma semicolon 1
#include <sourcemod>
#include <left4downtown>
#define L4D2UTIL_STOCKS_ONLY
#include <l4d2util>
#define IS_VALID_CLIENT(%1) (%1 > 0 && %1 <= MaxClients)
const TANK_ZOMBIE_CLASS = 8;
@devilesk
devilesk / classic-light-theme.css
Last active February 8, 2020 09:33
Discord light theme with a dark theme server and channel list to get a classic light theme look
/* windows top bar background color is transparent and based on the whole app background color */
.appMount-3lHmkl, .typeWindows-1za-n7, .platform-win {
--background-tertiary:#202225;
}
/* this contains everything below the windows top bar. set the background-tertiary back to the light theme color,
* otherwise the search bar background and border around wells in the chat section will be dark which we don't want */
.container-2lgZY8 {
--background-tertiary:#e3e5e8;
}
@devilesk
devilesk / AdjustBossFlow.sp
Created September 9, 2019 03:15
Modified AdjustBossFlow function for tank_and_nowitch_ifier plugin
// javascript implementation to test algorithm: https://jsfiddle.net/c8qdn03e/3/
public Action:AdjustBossFlow(Handle:timer)
{
if (InSecondHalfOfRound()) return;
decl String:sCurMap[64];
decl dummy;
GetCurrentMap(sCurMap, sizeof(sCurMap));
@devilesk
devilesk / tile.bat
Created September 4, 2016 19:49
Dota map image tiling script
if not exist "0" mkdir "0"
if not exist "1" mkdir "1"
if not exist "2" mkdir "2"
if not exist "3" mkdir "3"
if not exist "4" mkdir "4"
del /s /q "./0"
del /s /q "./1"
del /s /q "./2"
del /s /q "./3"
@devilesk
devilesk / prize_pool_data.json
Created August 27, 2014 12:25
dota 2 international 2014 compendium prize pool data
{
"comments": "Data is an array of [prize pool $ amount, year, month, day, hour, minute, second]",
"url": "http://devilesk.com/dota2/international/2014/prizepool/",
"data": [[2121630, 2014, 5, 10, 12, 30, 2], [2157459, 2014, 5, 10, 13, 0, 2], [2234502, 2014, 5, 10, 13, 30, 2], [2270004, 2014, 5, 10, 14, 0, 2], [2306160, 2014, 5, 10, 14, 30, 1], [2341462, 2014, 5, 10, 15, 0, 2], [2369449, 2014, 5, 10, 15, 30, 2], [2403332, 2014, 5, 10, 16, 0, 2], [2437604, 2014, 5, 10, 16, 30, 7], [2468696, 2014, 5, 10, 17, 0, 2], [2497777, 2014, 5, 10, 17, 30, 2], [2522017, 2014, 5, 10, 18, 0, 2], [2577526, 2014, 5, 10, 18, 30, 5], [2598168, 2014, 5, 10, 19, 0, 2], [2616714, 2014, 5, 10, 19, 30, 1], [2630758, 2014, 5, 10, 20, 0, 2], [2646972, 2014, 5, 10, 20, 30, 1], [2664469, 2014, 5, 10, 21, 0, 2], [2677089, 2014, 5, 10, 21, 30, 2], [2686665, 2014, 5, 10, 22, 0, 1], [2698076, 2014, 5, 10, 22, 30, 2], [2708824, 2014, 5, 10, 23, 0, 1], [2719268, 2014, 5, 10, 23, 30, 1], [2747348, 2014, 5, 11, 0, 0, 2], [2758313, 2014, 5
@devilesk
devilesk / compendiumprizepool.sql
Last active October 10, 2016 11:33
mysql dump of dota 2 international 2014 prize pool data
This file has been truncated, but you can view the full file.
-- Started this as a backup process for my scraper on 2014-05-14
-- which is a few days after the compendium was released,
-- so the earlier data is missing.
-- http://devilesk.com/dota2/international/2014/prizepool/
-- MySQL dump 10.13 Distrib 5.5.37, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: compendiumprizepool
-- ------------------------------------------------------
-- Server version 5.5.37-0ubuntu0.12.04.1