Skip to content

Instantly share code, notes, and snippets.

View romgerman's full-sized avatar
🥔
botato

romgerman

🥔
botato
View GitHub Profile
@romgerman
romgerman / anim.gd
Last active July 29, 2024 10:54
Animation function for Godot 4
extends Node
## Animation function
## [br]
## [param start_props] Sets values to properties on init. $ means "set property to initial value of node"
## [br]
## [param end_props] Sets properties for tweening
## [br]
## [param options] Global tween options such as duration, delay, parallel and trans
## [br]
@romgerman
romgerman / MonoBehaviourSingleton.cs
Created April 16, 2023 17:39 — forked from rickyah/MonoBehaviourSingleton.cs
MonoBehaviour Singleton
using System;
using UnityEngine;
/// <summary>
/// This is a generic Singleton implementation for Monobehaviours.
/// Create a derived class where the type T is the script you want to "Singletonize"
/// Upon loading it will call DontDestroyOnLoad on the gameobject where this script is contained
/// so it persists upon scene changes.
/// </summary>
/// <remarks>

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@romgerman
romgerman / example.js
Created July 6, 2019 14:55
Sequencing async functions with callbacks
utils.sequence([
(ready) => connection.query(createPersonTableSQL, (error, results, fields) => {
ready()
}),
(ready) => connection.query(createPortfolioTableSQL, (error, results, fields) => {
ready()
}),
(ready) => connection.query(createDebtTableSQL, (error, results, fields) => {
ready()
}),
@romgerman
romgerman / cooldown.cs
Created April 24, 2019 17:35
Untested cmd cooldown class for Rust (game)
static class CmdCooldown {
public static Dictionary<string, Dictionary<IPlayer, TimeSpan>> Players = new Dictionary<string, Dictionary<IPlayer, TimeSpan>>();
public static bool CanUse(IPlayer player, TimeSpan cooldown, [CallerMemberName] string name = null)
{
if (!Players.ContainsKey(name))
{
Players.Add(name, new Dictionary<IPlayer, TimeSpan>());
return true;
}
@romgerman
romgerman / style.scss
Created March 27, 2019 09:00
A more clean look for Nexus Vortex Mod Manager
#main-window-pane {
background: none;
}
.btn-menu-minimize {
padding: 6px;
}
#main-nav-sidebar #main-nav-container>:not(:last-child) {
box-shadow: none;
@romgerman
romgerman / ValveKeyValue.cpp
Last active October 5, 2023 13:20
Simple Valve Key Values parser in C++
#include "ValveKeyValue.h"
using namespace Parsers;
#include <exception>
#include <cctype>
ValveKeyValue::Token ValveKeyValue::LexNext()
{
bool readingValue = false;
@romgerman
romgerman / ValveKeyValues.YAML-tmLanguage
Created November 13, 2017 11:34
Simple KeyValues highlighting for Sublime Text 3. Save to "Packages\User" folder, then open and press F7 to compile
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: Valve Key Values
scopeName: text
fileTypes: []
uuid: c8ad0af6-a42c-4008-8737-36156bb81f61
patterns:
- name: comment
match: '\/\/.*'
@romgerman
romgerman / DarkFlat.qss
Last active September 14, 2017 14:24
Dark "Flat" theme for OBS based on Dark theme
/******************************************************************************/
/* Copyright (C) 2014-2015 by Philippe Groarke <[email protected]> */
/* */
/* */
/* This program is free software: you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation, either version 2 of the License, or */
/* (at your option) any later version. */
/* */
/* This program is distributed in the hope that it will be useful, */
@romgerman
romgerman / skin_readme.md
Last active November 13, 2017 10:28
Steam's skin_readme.txt in markdown for easy reading

This is a primer on how to create skins for Steam. The information below is extracted from the Valve internal document on how to edit, so it may in some cases be wrong or reference tools that don't exist.

To make a skin, you need to take a copy of resource/styles/steam.styles file and copy it to skins/<your skin name here>/resource/styles/steam.styles. The existance of that file will make Steam put that skin as an option in the settings->interface dialog (Steam will need to be restarted for it to show). From there you can start editing. You can put new files or existing steam files you want to replace under your skins folder. Good luck!

Tools

Hitting F6 key when running the Steam client toggles the VGUI editing dialog. You need to run Steam with the -dev command line parameter to have this work (running with -dev makes the Steam client run slower). When enabled, no other dialog can be interacted with; instead you can selected controls on any active dialog and get details on the selection.