Skip to content

Instantly share code, notes, and snippets.

View Atlante45's full-sized avatar

Clement Brisset Atlante45

  • Discord
  • San Francisco, CA
View GitHub Profile
{
"DataVersion": 0,
"Entities": [
{
"id": "{93db461e-1cc6-4156-a4cd-31f4840d238e}",
"type": "Box",
"lastEdited": 1549579849091989,
"name": "ESS Parenting Test",
"position": {
"x": -0.00002288818359375,
(function() {
var _this = this;
_this.preload = function(entityID) {
_this.entityID = entityID;
_this.interval = Script.setInterval(function(dt) {
var parentsCount = 0;
var props = Entities.getEntityProperties(_this.entityID);
var entitiesWithServerScripts = 0
var interval = Script.setInterval(function() {
console.log("Checks pending:", entitiesWithServerScripts)
var entities = Entities.findEntities(Vec3.ZERO, 100000);
for (var i in entities) {
var entity = entities[i];
var props = Entities.getEntityProperties(entity, ["serverScripts"]);
if (props.serverScripts != "") {
@Atlante45
Atlante45 / reload-failing-server-scripts.js
Created January 30, 2019 23:17
Tracks down and reloads failing entity server scripts.
var entitiesWithServerScripts = 0
function callbackClosure(i, callback) {
return function() {
return callback(i);
}
}
var interval = Script.setInterval(function() {
console.log("Checks pending:", entitiesWithServerScripts)
@Atlante45
Atlante45 / pre-push
Created January 18, 2019 18:21
git pre-push hook that prevent accidental pushes to upstream (Add it to .git/hooks)
#!/bin/sh
remote="$1"
url="$2"
bold=$(tput bold)
normal=$(tput sgr0)
yellow='\033[1;33m'
red='\033[0;31m'
default='\033[0m'
var soundURL = "http://hifi-public.s3.amazonaws.com/birarda/medium-crowd.wav";
var injector = null;
var sound = null;
function startInjector() {
injector = Audio.playSound(sound, {
position: MyAvatar.position,
volume: 0.5,
localOnly: false,
loop: true
var soundURL = "http://hifi-public.s3.amazonaws.com/birarda/medium-crowd.wav";
var injector = null;
var sound = null;
function startInjector() {
injector = Audio.playSound(sound, {
position: MyAvatar.position,
volume: 0.5,
localOnly: false,
loop: false
function getAvatarWithName(name) {
var avatars = AvatarList.getAvatarIdentifiers();
for (i in avatars) {
if (AvatarList.getAvatar(avatars[i]).displayName == name) {
return avatars[i];
}
}
return null;
}
Agent.isAvatar = false;
var count = 0;
Script.update.connect(function(dt) {
count += dt;
if (count > 5) {
console.log("Update");
count = 0;
}
});
//
// BetterClientSimulationBotFromRecording.js
// examples
//
// Created by Brad Hefta-Gaub on 2/6/17.
// Copyright 2017 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//