Skip to content

Instantly share code, notes, and snippets.

@twobob
twobob / testJavascript.html
Last active January 18, 2016 03:59
Eighteens Magic Numbers
<!-- Warning, the CHART DISPLAY part is pretty horrible - outdated - POC code
that needs a damn good looking at before it made it to production
Don't even ask about DOCTYPE declarations until this has had a tidy up //-->
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
<html>
<HEAD>
@twobob
twobob / RestartZeroProcessTimeArkServer.ps1
Last active January 12, 2016 23:20
Restart Zero Process Time ArkServer, with fail counts
$ProcessName = "ShooterGameServer"
$batPath = "C:\YOUR-PATH\ArkRun.bat"
$CountOfFailures = 0
$MaximumCountOfFailures = 60
$interval = 3
$LastTextWasAZero = 0 # false
$StartSleepInterval = 500
function Start-Server
{
"C:\Program Files (x86)\Steam\steamapps\common\ARK\ShooterGame\Binaries\Win64\ShooterGameServer.exe" TheIsland?QueryPort=27015?SessionName=YourSessionName?MaxPlayers=30?listen -nosteamclient -game -server
@twobob
twobob / HashCache.js
Created February 18, 2016 20:13 — forked from stamat/HashCache.js
A hash table value value storage for quick seek in large lists of big objects/arrays/strings. It uses CRC32 algorithm to convert supplied values into integer hashes and produce more elegant solution escaping data redundancy and heavy memory loads but also leaning on native hash map implementation for seek speed and optimization.
/**
* A hash table value value storage for quick seek in large lists of big objects/arrays/strings.
* It uses CRC32 algorithm to convert supplied values into integer hashes and produce more elegant solution escaping data redundancy and heavy memory loads but also leaning on native hash map implementation for seek speed and optimization.
*
* @author Nikola Stamatovic Stamat < [email protected] >
* @copyright ivartech < http://ivartech.com >
* @version 1.0
* @date 2013-07-02
* @namespace ivar.data
*/
C:\Windows\System32\rundll32.exe InetCpl.cpl, ClearMyTracksByProcess 8
@twobob
twobob / web.config
Created July 8, 2016 01:02
ghost URL rewrite web.config for IIS 6.x+ with production profile embedded
configuration>
<system.webServer>
<handlers>
<add name="iisnode" path="index.js" verb="*" modules="iisnode" />
</handlers>
<defaultDocument enabled="true">
<files>
<add value="index.js" />
</files>
</defaultDocument>
@twobob
twobob / config.js
Created July 8, 2016 01:05
IIS ready skeleton config.js for ghost to allow transparent port allocation
// # Ghost Configuration
// Setup your Ghost install for various [environments](http://support.ghost.org/config/#about-environments).
// Ghost runs in `development` mode by default. Full documentation can be found at http://support.ghost.org/config/
var path = require('path'),
config;
config = {
// ### Production
@twobob
twobob / LodFixerUpper.cs
Last active April 13, 2017 01:12
Remaps the various LOD objects to the proper Groups after Pro Draw call pass
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
public class LODFixer {
[MenuItem("Window/FixLODRendeer")]
static void LODRendeer()
@twobob
twobob / SaveSelected.cs
Last active April 13, 2017 00:32
Editor script to save slected items as prefabs (fixed Directory Seperator on windows)
using UnityEditor;
using UnityEngine;
using System.Collections;
using System;
using System.IO;
class CreatePrefabFromSelected : ScriptableObject
{
const string menuTitle = "GameObject/Create Prefab From Selected";
@twobob
twobob / RemoveOrphanRenderers.cs
Created April 13, 2017 01:07
For clearing down the blank mesh renderers from ProDrawCall - Works on Selected items + children
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using System.Linq;
// Select some Gameobjects in the scene view to use this
public class RipOrphanRenderers {
[MenuItem("Window/Remove Orphaned Disabled Renderers")]