Skip to content

Instantly share code, notes, and snippets.

@SignpostMarv
SignpostMarv / pretty-oar-download.php
Created August 12, 2013 16:05
Serve OAR files with prettier screen presence than a blank browser screen!
<?php
/**
Copyright (c) 2013 SignpostMarv
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@SignpostMarv
SignpostMarv / Second_Life_Marketplace_Social_stores.user.js
Last active December 20, 2015 01:29
Adds social buttons to SL Marketplace store pages.
// ==UserScript==
// @name Second Life Marketplace Social Stores
// @namespace https://marketplace.secondlife.com/
// @description Adds social buttons to SL Marketplace store pages.
// @include https://marketplace.secondlife.com/stores/*
// @version 1.1
// @grant none
// @updateURL https://gist.github.com/SignpostMarv/6049057/raw/Second_Life_Marketplace_Social_stores.user.js
// ==/UserScript==
//
@SignpostMarv
SignpostMarv / password.js
Last active December 17, 2015 15:09
Function to generate a password
(function(){var a='';for(var b=0;b<16;++b){a+=String.fromCharCode(Math.random()*93+33)}return a})()
@SignpostMarv
SignpostMarv / opensim-git-dist.sh
Created September 10, 2012 12:15
Shell script for packaging up OpenSim builds (run from bin directory)
GITNAME="$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')"
DIRNAME="${1-../..}/${GITNAME}"
TIMESTAMP="$(date +%Y-%m-%d_%H-%M-%S)"
FILENAME="opensim (${GITNAME}) ${TIMESTAMP}"
if [ -f ../../7za.exe ];
then
echo "Using 7-zip"
../../7za.exe a "../../${FILENAME}.tar" ./*
../../7za.exe a -tgzip "../../${FILENAME}.tgz" "../../${FILENAME}.tar" -mx=9 -mfb=258 -mpass=15
rm "../../${FILENAME}.tar"
@SignpostMarv
SignpostMarv / GridService.cs snippet
Created May 1, 2012 20:00
possible fix for grid clear regions sql syntax error
private void HandleClearAllRegions(string[] cmd)
{
//Delete everything... give no criteria to just do 'delete from gridregions'
m_Database.DeleteAll(new string[1]{ "1" }, new object[1]{ 1 });
MainConsole.Instance.Warn("Cleared all regions");
}
@SignpostMarv
SignpostMarv / proposal 2.md
Created January 15, 2012 02:29
proposal to nuke PHP from aurora-webui master branch
  1. The PHP will not be removed from frozen branch so will still be available to end-users
  2. The master branch can be tagged something to the effect of "pre-nuke" for ease-of-use instead of reading through the log
  3. The PHP is incredibly difficult to maintain
    • It requires a non-strict PHP configuration
    • It only supports MySQL and cannot be used with SQLite
    • It assumes all tables are in one database, making it unusable when operating Aurora in grid mode with decentralised services
    • The code that interacts with the WebUI module is not centralised, making it difficult to maintain.
    • Translation is handled in a non-standard format.

By removing the original PHP from the master branch whilst retaining it in the frozen branch, less burden is placed on developers to maintain the PHP when modifying the c# module, freeing up time to develop independent website implementations such as [https://github.com/skidzTweak/Aurora-Sim-Joomla](skidz' Joomla implementation) and [https://github.com/SignpostMarv/Aurora-We

@SignpostMarv
SignpostMarv / proposal 1.md
Created January 15, 2012 00:40
aurora-sim frozen branch proposal

Proposal

  1. new branch be created from master, named "frozen"
  2. frozen branch is primarily for bug fixes
  3. cast votes to decide whether to make a given commit hash the latest release

frozen vs. master

master

  • use common sense when pushing to aurora-sim master branch
object(Aurora\Addon\WebUI\GridInfo)#5 (1) {
["data":protected]=>
array(4) {
["GridInfoInHandlerPort"]=>
string(1) "0"
["login"]=>
string(22) "http://127.0.0.1:9000/"
["gridname"]=>
string(19) "My Aurora Simulator"
["gridnick"]=>
<?
////////////////////////////////// ADMIN ///////////////////////////////////////
if ($_SESSION[ADMINID]) {
$DbLink = new DB;
if ($_GET[delete] == 1) {
$DbLink->query("DELETE from " . C_NEWS_TBL . " WHERE (id = '" . cleanQuery($_GET[id]) . "')");
}
@SignpostMarv
SignpostMarv / Imprudence-OpenSim-accidentally-made-avatar-invisible.xml
Created May 24, 2011 13:51
Accidentally made my avatar invisible whilst editing an attachment in Imprudence on an OpenSim grid.
<llsd>
<map>
<key>data</key>
<array>
<map>
<key>group_body</key>
<map>
<key>2459065186</key>
<map>
<key>phantom</key>