Skip to content

Instantly share code, notes, and snippets.

View romgerman's full-sized avatar
🥔
botato

romgerman

🥔
botato
View GitHub Profile
@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.

function Timer(interval, repeat, callback) {
this.isStopped = true;
this.interval = interval;
this.repeat = repeat;
this.callback = callback;
this.prevTime = null;
this.start = function() {
this.isStopped = false;
}
@romgerman
romgerman / NameGenerator.cs
Last active April 24, 2019 17:37
Incremental name generator
class NameGenerator
{
char[] allowedChars = new char[] { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'_' };
int index = 1;
public string New()
{
@romgerman
romgerman / router.js
Last active May 5, 2017 09:05
Simple node.js router
function Router () {
this.routes = [];
this.fallback = function(request, response) { };
this.run = function (request, response) {
var pathname = url.parse(request.url).pathname;
var match = this.routes.map(function(route) {
var routeUrl = route.url;
var requestUrl = pathname.split('/');
@romgerman
romgerman / main.lua
Created February 6, 2017 05:48
Love2d asteroids (pseudo 3d)
local function Vector2(x, y)
local v = {
x = x,
y = y
}
return v;
end
local function Mat2( m11, m12, m21, m22 )
@romgerman
romgerman / Followers.html
Created December 28, 2016 21:12
Simple html page showing last followers on Twitch (for OBS)
<!DOCTYPE html>
<html>
<head>
<title>Twitch followers</title>
<style type="text/css">
/* ---------- RESET ----------*/
@charset "utf-8";
*{margin:0;padding:0}
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video
@romgerman
romgerman / fgd.YAML-tmLanguage
Last active November 14, 2016 22:05
Simple FGD highlighting for Sublime Text 3. Save to "Packages\User" folder, then open and press F7 to compile (do you need Package Development package?).
# [PackageDev] target_format: plist, ext: tmLanguage
name: Forge Game Data
scopeName: source.fgd
fileTypes: [fgd]
uuid: 8252edf9-45b0-4c06-8a32-171c354765dc
patterns:
- name: entity.name.class
match: '(@include|@BaseClass|@PointClass|@NPCClass|@SolidClass|@KeyFrameClass|@MoveClass|@FilterClass)'