This file contains hidden or 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
#region Singleton Pattern | |
// NOTE: The class is marked as sealed to prevent the inheritance of the class (i.e. use it as base/super class). | |
internal sealed class Singleton | |
{ | |
private static readonly object SingletonSyncRoot = new object(); | |
private static volatile Singleton _instanceSingleton; | |
// NOTE: Default/Parameterless constructor is private to prevent instantiation of the class. | |
private Singleton() |
This file contains hidden or 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
// ==UserScript== | |
// @name Anti-Anti-AdBlock for plebleaks.com | |
// @namespace http://plebleaks.com/ | |
// @version 0.1 | |
// @description Anti-Anti-AdBlock for plebleaks.com | |
// @author OmegaExtern | |
// @match http://plebleaks.com/* | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or 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
// Garry's Mod CVars dump (3rd Dec 2015) - run on development branch (2.12.2015.) - in default gamemode "Sandbox". | |
// All names have been lowercased and sorted (in alphabetical order). Total count is 3480. | |
+alt1 | |
+alt2 | |
+attack | |
+attack2 | |
+attack3 | |
+back | |
+break | |
+camdistance |
This file contains hidden or 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
/////////////////////////////////////////////////////////// | |
// <DodgerSky> skin created by OmegaExtern. | |
// Quick rewrite of the skin I have lost a few days ago. | |
// Originally written for Garry's Mod game. | |
// | |
// Installation: | |
// Copy this file into the following folder: [Steam installation directory]\steamapps\common\GarrysMod\garrysmod\resource. | |
/////////////////////////////////////////////////////////// | |
// Tracker scheme resource file | |
// |
This file contains hidden or 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
-- This code is for begginers; I have intentionally left out lots of things such as auto-refresh compatibility... | |
if ( !SERVER ) then | |
-- This script is mean to be executed/opened on the serverside! | |
ErrorNoHalt( "Not serverside" ) -- Tell an admin it is not run from environment where it is expected as. | |
return -- Exit/terminate a script. | |
end | |
-- ConVars to manage the spawn protection system: | |
local sv_spawnprotection = CreateConVar( "sv_spawnprotection", "1", { FCVAR_ARCHIVE, FCVAR_NOTIFY }, "Determines whether simple spawn protection is enabled or disabled" ) | |
local sv_spawnprotection_delay = CreateConVar( "sv_spawnprotection_delay", "8", { FCVAR_ARCHIVE, FCVAR_NOTIFY }, "Determines how long should spawn protection last in seconds after a player has spawned" ) |
This file contains hidden or 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
--[[------------------------------------------------- | |
Author: OmegaExtern <[email protected]> | |
License: MIT <https://opensource.org/licenses/MIT> | |
----------------------------------------------------- | |
To install, save this file in the following folder (create a folder if it does not exist, it is case-sensitive): | |
(Steam installation directory)\steamapps\common\GarrysMod\garrysmod\addons\protect-skybox-area\lua\autorun\server | |
Supported maps: | |
gm_construct | |
gm_flatgrass |
This file contains hidden or 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
-- Revision 4. Added parentheses on if-statements. | |
-- Since I have experienced a strange bug in singleplayer on the serverside (clean Garry's Mod dev-branch install): | |
-- lua_run type( player.GetAll()[1]:SteamID64() ) | |
-- Above command should return "nil" or throw an error, as function call is given an argument. But it does NOT. | |
-- I have decided to fix it. Here is my second attempt at it (also updated script style to: C language without semicolon): | |
if ( BRANCH:upper() != 'DEV' ) then | |
-- Just because I can. This can be ignored (doesn't throw error). | |
print( "Warning: dev branch not detected, this may not work as expected." ) | |
end | |
if ( !game.SinglePlayer() || game.MaxPlayers() < 2 ) then |
This file contains hidden or 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 this on server, not client-side! | |
if not SERVER then | |
error('Run this on the server-side (lua_openscript)!') | |
end | |
-- Find all "func_breakable" entities, and store the result into local "func_breakables" variable. | |
local func_breakables = ents.FindByClass('func_breakable') | |
if #func_breakables < 1 then | |
-- Throws an error if none were founded. | |
error('No "func_breakable" entities were founded.') | |
end |
This file contains hidden or 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
-- Solution for: http://facepunch.com/showthread.php?t=1462506&p=47602760&viewfull=1#post47602760 | |
local getinfo, getlocal, gsub = debug.getinfo, debug.getlocal, string.gsub | |
string.Interp = function(str, tbl) | |
local funcname = getinfo(1.0, "n").name | |
assert(funcname == "Interp", "nope.") | |
for argc = 1.0, getinfo(1.0).nparams, 1.0 do | |
local argname = getlocal(1.0, argc) | |
-- Hard-coded with <3 by OmegaExtern. | |
if argc == 1.0 and argname == "str" then | |
assert(type(str) == "string" and isstring(str), Format("bad argument #%i (%s) to '%s' (string expected, got %s)", argc, argname, funcname, type(str))) |