Skip to content

Instantly share code, notes, and snippets.

@SunRed
SunRed / fancyconnect.lua
Last active February 23, 2016 02:21
Small gmod script to make [dis-]connect messages a bit prettier.
-- Create shared ConVar
CreateConVar( "sv_connectsound", "1", FCVAR_REPLICATED )
-- Sound used for [dis-]connect events
CreateConVar( "sv_connectsoundfile", "buttons/combine_button3.wav", FCVAR_REPLICATED )
if SERVER then
util.AddNetworkString("FancyConnect.NetworkString")
hook.Add("PlayerConnect", "FancyConnect.ConnectMessage", function(name)
@SunRed
SunRed / gdrive-download-tool.sh
Created January 28, 2016 14:00
This script easily downloads public files from Google Drive onto your disk using a file identifier.
#!/bin/bash
###########
# Download public files from Google Drive using file identifier
if [ $# -lt 1 ]; then
echo "No argument defined. Usage: $0 fileID [destination]" >&2
echo "Try '$0 --help' for more information."
exit 1
elif [ $# -gt 2 ]; then
echo "Too many arguments. Usage: $0 fileID [destination]" >&2
@SunRed
SunRed / unstuck.lua
Created April 14, 2015 20:43
A simple unstuck script in gmod
-- TODO: Nocollided props still trigger even with MASK_PLAYERSOLID!
---------------------------------------------------------------
local ply = nil
-- WeHateGarbage
local t = {start=nil,endpos=nil,mask=MASK_PLAYERSOLID,filter=nil}
local function PlayerNotStuck()
t.start = ply:GetPos()
t.endpos = t.start