Skip to content

Instantly share code, notes, and snippets.

View Decicus's full-sized avatar
💻

Alex Thomassen Decicus

💻
View GitHub Profile

Mounting INFRA content on a Garry's Mod server

  1. Log in using SteamCMD with your credentials (you need to own INFRA on your account)
    • Start steamcmd via command line.
    • Type: login YOUR_USERNAME_HERE
    • Type in password and 2FA code.
  2. Set install directory using force_install_dir
    • Example on Linux: force_install_dir /home/alex/my_gmod_server/infrafiles
    • Example on Windows: force_install_dir C:/my_gmod_server/infrafiles
  3. Make sure to set the correct platform type for SteamCMD: @sSteamCmdForcePlatformType windows
@Decicus
Decicus / font_awesome.rb
Last active March 9, 2018 15:19 — forked from 23maverick23/font_awesome.rb
Jekyll: Font Awesome icons Liquid tag
##
# The MIT License (MIT)
#
# Copyright (c) 2014 Ryan Morrissey
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@Decicus
Decicus / PHPTimezones.txt
Created September 19, 2017 05:47
List as specified by DateTimeZone::listIdentifiers().
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
Africa/Blantyre
@Decicus
Decicus / Roll.md
Last active October 9, 2018 19:04
Nightbot evals and stuff

Usage

!roll will default to 🎲 USERNAME rolled NUMBER 🎲 where USERNAME will be the username/nickname of the user and NUMBER is a random number between 1-20.

!roll Hello world, this is a test. will turn into 🎲 Hello world, this is a test. rolled NUMBER 🎲. Where NUMBER is a random number between 1-20.

Command

!commands add !roll $(eval const q = decodeURIComponent(`$(querystring)`); let input = q !== '' ? q : `$(user)`;`🎲 ${input} rolled ${Math.floor(Math.random() * (20 - 1 + 1)) + 1} 🎲`)

[
{
"keys": ["ctrl+q"],
"command": "toggle_comment",
"args": {
"block": "false"
}
},
{
"keys": ["alt+1"],
@Decicus
Decicus / setmulti_with_kadgar.md
Last active July 12, 2018 01:52
Miscellaneous Nightbot commands using variables

Usage

!setmulti <streams> where <streams> is just the channel names for the ones you're streaming with, separated by a space between every channel.

Command

!commands add -a=!commands !setmulti edit !multi http://kadgar.net/live/$(channel)/$(eval const streams = '$(query)'.split(" ");streams.join("/");)

{
"actions": [{
"prefix": "Cheer",
"scales": ["1", "1.5", "2", "3", "4"],
"tiers": [{
"min_bits": 1,
"id": "1",
"color": "#979797",
"images": {
"dark": {
@Decicus
Decicus / object.json
Last active November 30, 2016 18:18
Twitch broadcaster language codes - November 2016
{
"en": "English",
"zh": "中文",
"ja": "日本語",
"ko": "한국어",
"es": "Español",
"fr": "Français",
"de": "Deutsch",
"it": "Italiano",
"pt": "Português",
@Decicus
Decicus / GetServerList.md
Last active November 26, 2023 00:05
Steam - GetServerList (DayZ)

GetServerList

  • API endpoint: https://api.steampowered.com/IGameServersService/GetServerList/v1/?filter=\gamedir\dayz\name_match\*Experimental*&limit=5000&key=
  • The filter parameter can be any of these: https://developer.valvesoftware.com/wiki/Master_Server_Query_Protocol#Filter
  • The limit parameter is maximum amount of servers to return. I haven't tested anything higher than 10000 (ten thousand).
    • It seems this accepts pretty much any number, but the highest amount of servers I've gotten listed is 20,000 (twenty thousand).
  • The key parameter is your Steam API key, which I'm sure you already have, but if not: https://steamcommunity.com/dev
@Decicus
Decicus / TwitchPrime.css
Last active October 2, 2016 20:48
Makes Twitch Prime badges white on purple instead of white on lightblue (BTTV-only)
@-moz-document url-prefix("https://www.twitch.tv/") {
.twitch-premium-1 {
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAIAAADZrBkAAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NUYxNjIxREY4OEJCMTFFNjkzQTZGOEEyMEQwMjE5NTciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NUYxNjIxRTA4OEJCMTFFNjkzQTZGOEEyMEQwMjE5NTciPiA8eG1