Skip to content

Instantly share code, notes, and snippets.

View Rainyan's full-sized avatar
💭
I may be slow to respond.

Rain Rainyan

💭
I may be slow to respond.
  • Finland
  • 19:25 (UTC +03:00)
View GitHub Profile
@Rainyan
Rainyan / SteamUserFunctions.php
Created June 18, 2017 16:56 — forked from rannmann/SteamUserFunctions.php
Convert Steam IDs to and from Community IDs and User IDs
<?php
/* Examples
toSteamID(25490879) // STEAM_0:1:12745439
toSteamID(76561197985756607) // STEAM_0:1:12745439
toSteamID("STEAM_0:1:12745439") // STEAM_0:1:12745439
toUserID(25490879) // 25490879
toUserID(76561197985756607) // 25490879
toUserID("STEAM_0:1:12745439") // 25490879
echo Rain cfg (2017-11-26)
// Launch options:
// -high -threads 3 -novid -nojoy -console -toconsole +exec csgo_binds_wasd -w 1280 -h 1024
fps_max 300
cl_allowdownload 0
cl_forcepreload 1
mat_queue_mode 2
// Key binds.
@Rainyan
Rainyan / prac.cfg
Last active May 25, 2023 16:00
CS:GO binds, etc. configs
// CSGO practice config
// 60 minutes time, buy anywhere, no bots.
// Restart the game if it's in incorrect game mode.
// TODO: how to reset game mode/type?
sv_full_alltalk 1
mp_roundtime_defuse 60
bot_kick
@ECHO off
REM Purpose: Toggle custom assets for a Source engine map on/off by renaming their
REM paths with a "_disabled" suffix. Disabling all custom assets can help making
REM sure all custom assets are properly BSPZIP'd in the map file before distribution.
REM ########################
REM Set project paths below.
REM ########################
// Linux launch command:
// nvidia-settings -a "DigitalVibrance[DP-1]=800"; %command% -threads 4 -novid -nojoy -console -toconsole +exec csgo_binds_sgdf; nvidia-settings -a "DigitalVibrance[DP-1]=0"
echo "Rain Linux temp accel cfg..."
m_customaccel "1"
m_customaccel_exponent "0.85"
m_customaccel_max "2.5"
m_customaccel_scale "0.04"
m_mouseaccel1 "0"
<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
<BuildConfiguration>
<ProcessorCountMultiplier>2</ProcessorCountMultiplier>
</BuildConfiguration>
</Configuration>
@Rainyan
Rainyan / fetch_channels.py
Last active February 11, 2022 16:36
This Python script fetches simple YT API metadata about channels' latest uploads, and outputs it to screen as text. Note that Youtube also exposes RSS feeds for this, so you're probably better off using that. This was just made for fun.
#!/usr/bin/env python
"""Get results for multiple pre-defined Youtube channels at once.
Can either use channel names or the "UC..." channel id scheme.
"""
from sys import platform
import yt_activity
YOUTUBE_CHANNELS = {
[MouseSettings]
Sensitivity=1
Acceleration=0.015
SensitivityCap=6.75
SpeedCap=0
Offset=0
Power=2
Pre-ScaleX=1
Pre-ScaleY=1
Post-ScaleX=0.0702
@Rainyan
Rainyan / build_qc.py
Last active November 25, 2018 05:23
Python script to generate QC files for Source SDK studiomdl compiler.
#!/usr/bin/env python
"""Generate a QC file for Source SDK studiomdl compile."""
# TODO: 2 separate commands for
# 1. generating qc (and storing to file) without running studiomdl
# 2. running studiomdl with the qc
import os
import subprocess
import warnings
# https://superuser.com/questions/704493/ffmpeg-convert-m4a-files-to-mp3-without-significant-loss-of-information-quali#704535
mkdir newfiles
for f in *.m4a; do ffmpeg -i "$f" -codec:v copy -codec:a libmp3lame -q:a 2 newfiles/"${f%.m4a}.mp3"; done