Skip to content

Instantly share code, notes, and snippets.

View mrspartak's full-sized avatar
🏠
Working from home

Spartak mrspartak

🏠
Working from home
View GitHub Profile
@mrspartak
mrspartak / ammo_attachments.json
Created September 28, 2025 07:39
Rust filters x3
[
{
"TargetCategory": null,
"MaxAmountInOutput": 0,
"BufferAmount": 0,
"MinAmountInInput": 0,
"IsBlueprint": false,
"BufferTransferRemaining": 0,
"TargetItemName": "weapon.mod.8x.scope"
},
@mrspartak
mrspartak / detect_goamd64.ps1
Last active September 23, 2025 04:45
Detect GOAMD64 level on linux machine
$script = {
$cpu = Get-WmiObject Win32_Processor
$flags = $cpu.Caption + " " + $cpu.Name + " " + $cpu.Description
function Check-Flag {
param([string]$flag)
return $flags -match $flag
}
if ((Check-Flag "AVX512F") -and (Check-Flag "AVX512BW") -and (Check-Flag "AVX512CD") -and (Check-Flag "AVX512DQ") -and (Check-Flag "AVX512VL")) {
{
"a": 123
}
@mrspartak
mrspartak / track_requests.js
Created August 16, 2017 12:14
Track requests
//add this lines before all code
const http = require('http');
const originalRequest = http.request;
http.request = function wrapMethodRequest(req) {
console.log('TRACKED', req.host);
return originalRequest.apply(this, arguments);
}
var RustStatsCom = {
Title : "Rust-Stats.Com",
Author : "John Wick",
Version : V(0, 0, 1),
Description : "Collect stats from server to site rust-stats.com",
Init: function() {
print("Init works!");
rust.RunServerCommand('status', {});
Function FindInRangeValue(Diapazon As Range, Values As Range, Search) As String
Dim row As Range
For Each row In Diapazon.Rows
If row.Columns(1).Value <= Search Then
If row.Columns(2).Value >= Search Then
FindInRangeValue = Values.Rows(row.row).Value
End If
End If
Next row
End Function
https://github.com/plimble/ace
https://github.com/zenazn/goji !
https://github.com/codegangsta/gin !
http://www.gorillatoolkit.org/pkg/mux
@mrspartak
mrspartak / 0_reuse_code.js
Last active August 29, 2015 14:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?
class Bench
{
const defaultName = 'default';
private $_container = array();
public function start($name = self::defaultName)
{
$this->_container[$name] = array(
@mrspartak
mrspartak / gist:5336322
Last active December 15, 2015 22:58
Count lines of code Usage: run in current directory, or just pass the path to directory as parameter in CLI. Returns: json
<?php
ini_set('xdebug.max_nesting_level', 0);
$dir = $argv[1] ? $argv[1] : dirname(__FILE__);
if(!is_dir($dir))
exit('Error');
$global = array();
read($dir);