Skip to content

Instantly share code, notes, and snippets.

/*
var themes = UnlockableTheme.GetCachedLocalAvailableThemeIndices();
NetworkConnectionError error = NetworkConnectionError.UserDefined1;
//uLink not supporting by default arrays :^(
switch (themes.Count)
{
case 1: error = Network.Connect(host, port, password, playerName, 1, themes[0]); break;
case 2: error = Network.Connect(host, port, password, playerName, 2, themes[0], themes[1]); break;
case 3: error = Network.Connect(host, port, password, playerName, 3, themes[0], themes[1], themes[2]); break;
case 4: error = Network.Connect(host, port, password, playerName, 4, themes[0], themes[1], themes[2], themes[3]); break;
using System;
using System.Collections;
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Remoting.Metadata;
using System.Runtime.Remoting.Metadata.W3cXsd2001;
using System.Runtime.Remoting.Proxies;
using System.Runtime.Serialization;
WARNING: 'org.apache.xerces.jaxp.SAXParserImpl: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.'
2015-09-04 18:47:42,526 ERROR [Thread-65] PluginSettingsMetadataLoader:94 - Failed to fetch Plugin Settings metadata for plugin : yum
java.lang.RuntimeException: Interaction with plugin with id 'yum' implementing 'package-repository' extension failed while requesting for 'go.plugin-setting
s.get-configuration'. Reason: [Unsuccessful response from plugin. Plugin returned with code '400' and the following response: 'Invalid request name go.plugi
n-settings.get-configuration']
at com.thoughtworks.go.plugin.access.PluginRequestHelper.submitRequest(PluginRequestHelper.java:38)
at com.thoughtworks.go.plugin.access.common.settings.AbstractExtension.getPluginSettingsConfiguration(AbstractExtension.java:38)
at com.thoughtworks.go.plugin.access.packagematerial.PackageAsRepositoryExtension.getPluginSettingsConfiguration(PackageAsRepositoryExtension.java:5
0)
@strich
strich / Unity binary file deserialization.cpp
Created September 7, 2015 15:05
Unity binary file deserialization.cpp
//The current format is stored in the endianess of the platform that records it, and then swizzled into place in the editor strings are then handled specially
//Here are some sniplets from the current deserialization:
int dataIsLittleEndian = *((*bitstream)++);
bool shouldswap = UNITY_LITTLE_ENDIAN ? dataIsLittleEndian == 0 : dataIsLittleEndian != 0;
if(shouldswap)
{
int* ptr = *bitstream;
while(ptr < endBuffer)
SwapEndianBytes(*(ptr++));
using UnityEngine;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
public class AnimatedUnitCompressor : EditorWindow {
Vector2 scrollPos = Vector2.zero;
public List<GameObject> UnitPrefabs;
public static string BonePrefix;
private SerializedObject _serializedObject;
function SetGlobalJobOptions() {
$.ajax({
url: '@Url.Action("SetGlobalJobOptions")' + '/?id=' + @Model.ID + '&' +
'BenchmarkTest=' + $('#BenchmarkTest').is(':checked') + '&' +
'DeployBuild=' + $('#DeployBuild').is(':checked'),
//success: success,
});
}
public class Project
{
public int ID { get; set; }
public string DisplayName { get; set; }
public Organisation OrganisationOwner { get; set; }
}
public class Organisation
{
public int ID { get; set; }
using System;
using System.Collections.Generic;
using Microsoft.Data.Entity.Migrations;
namespace GameRigger.Migrations
{
public partial class Initial : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
java.lang.NoClassDefFoundError: org/apache/ivy/core/settings/IvySettings
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2615)
at java.lang.Class.getDeclaredMethods(Class.java:1860)
at org.codehaus.groovy.reflection.CachedClass$3$1.run(CachedClass.java:84)
at java.security.AccessController.doPrivileged(Native Method)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:81)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:79)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
using UnityEditor;
using System;
using UnityEditor.SceneManagement;
using UnityEngine;
[InitializeOnLoad]
public class ForceEditorWriteToDisk {
private static bool _flushAssets = true;
private static bool _flushScenes = false;