Skip to content

Instantly share code, notes, and snippets.

// http://mrl.nyu.edu/~perlin/noise/
(function(){
window.perlin = function(x, y, z){
var floorX = Math.floor(x), floorY = Math.floor(y), floorZ = Math.floor(z);
var X = floorX & 255, Y = floorY & 255, Z = floorZ & 255;
x -= floorX;
y -= floorY;
@SignpostMarv
SignpostMarv / github-commit-diff-link.user.js
Created March 14, 2011 15:33
github.com raw diff link greasemonkey script
<!DOCTYPE llsd [
<!ELEMENT llsd (undef|boolean|integer|real|uuid|string|date|uri|binary|map|array)>
<!ELEMENT DATA (undef|boolean|integer|real|uuid|string|date|uri|binary|map|array)>
<!ELEMENT ATOMIC (undef|boolean|integer|real|uuid|string|date|uri|binary)>
<!ELEMENT KEYDATA (key,(undef|boolean|integer|real|uuid|string|date|uri|binary|map|array))>
<!ELEMENT key (#PCDATA)>
<!ELEMENT map ((key,(undef|boolean|integer|real|uuid|string|date|uri|binary|map|array))*)>
<!ELEMENT array ((undef|boolean|integer|real|uuid|string|date|uri|binary|map|array)*)>
<!ELEMENT undef (EMPTY)>
<!ELEMENT boolean (#PCDATA)>
@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>
<?
////////////////////////////////// ADMIN ///////////////////////////////////////
if ($_SESSION[ADMINID]) {
$DbLink = new DB;
if ($_GET[delete] == 1) {
$DbLink->query("DELETE from " . C_NEWS_TBL . " WHERE (id = '" . cleanQuery($_GET[id]) . "')");
}
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"]=>
@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
@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 / 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 / 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"