Skip to content

Instantly share code, notes, and snippets.

View fr34kyn01535's full-sized avatar
🎯
Focusing

Sven Mawby fr34kyn01535

🎯
Focusing
View GitHub Profile
@fr34kyn01535
fr34kyn01535 / arguments.txt
Last active April 13, 2017 17:10
Rocket Command Argument Syntax
Rocket Command Argument Syntax Defintion --- Draft ---
Rocket commands are called with a variety of possible arguments.
Instead of parsing them individually the idea is to define a syntax to define arguments, and let rocket parse and validate.
1) Syntax definition
<> required argument
[] optional argument
2) Defining name and type
function trig()
print("BTN2 button pressed")
node.restart()
end
function rst()
print("BTN1 button pressed")
node.restart()
end
**RocketMod Contributor License Agreement**
Thank you for your interest in contributing to open source software projects (“Projects”) made available by Sven Mawby Software Solutions.
This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Sven Mawby Software Solutions in respect of any of the Projects (collectively “Contributions”).
If you have any questions respecting this Agreement, please contact [email protected].
You agree that the following terms apply to all of your past, present and future Contributions.
Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
@echo off
set newbuildid=0
set buildid=0
bitsadmin /transfer buildid /download http://update.unturned.hosting/buildid.tmp %~dp0buildid.tmp
set /p newbuildid=<%~dp0buildid.tmp
set /p buildid=<%~dp0buildid.cache
cls
echo Lastest version: %newbuildid%
if "%newbuildid%" == "%buildid%" (
@fr34kyn01535
fr34kyn01535 / unity3d-gui.md
Last active October 26, 2016 11:18
Controlling Unity3D dedicated servers | window toolkits & IPC /RPC methods

There is two ways of controlling a dedicated servers:

  1. Using a GUI toolkit to render a window with all the needed controls
  2. Using some kind of service framework (IPC/RPC methods) hosted in Unity3D to make remote access using any tool possible

#Possible GUI toolkits

Windows.Forms

Advantages:

@fr34kyn01535
fr34kyn01535 / rcon.php
Last active February 24, 2023 09:01
Quick'n dirty PHP client for RocketMod RCON
<?php
class RocketRCON {
private $socket;
private $connected = false;
public $errstr;
function connect($ip,$port,$password,$timeout = 5) {
try{
$this->socket = fsockopen($ip, intval($port), $errno, $errstr, $timeout);
@fr34kyn01535
fr34kyn01535 / invoices.js
Created September 6, 2016 14:51
Open selected paypal invoices
var ids = [];
$(".selected-row").each(function(i,item){
var id = $(item).attr("data-txn-id");
ids.push(id);
var w = window.open("https://history.paypal.com/webscr?cmd=_history-details-from-hub&id="+id);
});
<?php
/*
Requirements: php-redis
*/
if(php_sapi_name() != 'cli') die();
define("REDIS_HOST","bespin.bam.yt");
define("STEAM_API_KEY",$argv[1]);
define("REDIS_AUTH",$argv[2]);
if(isset($argv[3])){
define("IP",$argv[3]);
@fr34kyn01535
fr34kyn01535 / drives.js
Created May 31, 2016 13:11
Node.js script to load all partitions, load all recursive children folder and files, calculating the total folders size and write them to a json file
var fs = require('fs'),
path = require('path')
if (!fs.existsSync('./partitions')){
fs.mkdirSync('./partitions');
}
function getFilesRecursive (folder,callback) {
var fileContents = fs.readdirSync(folder),
@fr34kyn01535
fr34kyn01535 / configuration.php
Last active March 14, 2016 20:29
WebConfiguration Example
<?php header("Content-Type: application/xml; charset=utf-8");
header("Expires: on, 01 Jan 1970 00:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
if(!isset($_GET["configuration"]) || !isset($_GET["instance"])) die();
if(strstr($_GET["configuration"], '/') || strstr($_GET["configuration"], '.')) die();