This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LANG="ja_JP.UTF8" wine binary | |
# Alternative | |
LC_ALL="ja_JP" wine binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script toggles ptrace protection for attaching a debugger during development. | |
# kernel.yama.ptrace_scope = 0: all processes can be debugged, as long as they have same uid. This is the classical way of how ptracing worked. | |
# kernel.yama.ptrace_scope = 1: only a parent process can be debugged. | |
# kernel.yama.ptrace_scope = 2: Only admin can use ptrace, as it required CAP_SYS_PTRACE capability. | |
# kernel.yama.ptrace_scope = 3: No processes may be traced with ptrace. Once set, a reboot is needed to enable ptracing again. | |
# Need sudo for this script. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory=$True,Position=1)] | |
[string]$download_url, | |
# Where to store downloaded file | |
[string]$download_location = (Split-Path $MyInvocation.MyCommand.Path), | |
[string]$download_tool = "youtube-dl", | |
# If download stops, try resume this many times at most | |
[int]$max_iterations = 10000, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// C++ snippet to download (Windows) SteamCMD, unzip it, and then verify its integrity. | |
// Tested very little, use at your own risk. | |
#include <iostream> | |
#include <vector> | |
#include <fstream> | |
#include <iterator> | |
#include <stdarg.h> | |
#include <tchar.h> | |
#include <string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Degrees of rotation": 0.0, | |
"Use x as whole/combined accel": true, | |
"Accel modes": { | |
"x": "classic", | |
"y": "noaccel" | |
}, | |
"Accel parameters": { | |
"x": { | |
"offset": 0.0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
"""Python 3 script to iterate all SRCDS logs, | |
and store connected players' IPv4 addresses to a single file, one per line. | |
Note that this script currently only handles IPv4 addresses.""" | |
# Copyright (c) 2020 Rainyan https://github.com/Rainyan | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO off | |
SETLOCAL EnableDelayedExpansion | |
REM Set links for large amounts of "pak01_nnn.vpk" files. | |
SET prefix=pak01_ | |
SET suffix=.vpk | |
SET fileOrigin=C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo | |
SET linkLocation=. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma semicolon 1 | |
#include <sourcemod> | |
#include <sdktools> | |
#define PLUGIN_VERSION "0.1" | |
public Plugin myinfo = { | |
name = "NT Props Tester", | |
description = "Spawn all NT props.", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import time | |
from pathlib import Path | |
from shutil import copyfile | |
from struct import unpack | |
############################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Convert IPv4 octet string representation to int. | |
// Supports 1 to 4 octets ("127" == 2130706432. "127.1" == "127.0.1" == "127.0.0.1" == 2130706433). | |
stock int Ip4ToDecimal(const char[] sIp, const int ipLen) | |
{ | |
int numOctets = GetNumOfCharInStr('.', sIp, ipLen) + 1; | |
if (numOctets > 4) { | |
ThrowError("More than 4 octets (%d) in string: \"%s\"", numOctets, sIp); | |
} | |
int numPaddingOctets = 4 - numOctets; | |