Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🍆

Félix FelixWolf

💭
🍆
View GitHub Profile
View natloopback.sh
#!/usr/bin/env bash
#Set this to the address to rewrite to:
NewAddress=192.168.0.127
#This pulls the ip from ipify.org:
CurrentAddress=$(wget -qO- https://api.ipify.org)
#Initialize a empty variable containing the lines to delete
lines=""
View animation_ids.lsl
#define ANIM_EXPRESS_AFRAID "6b61c8e8-4747-0d75-12d7-e49ff207a4ca"
#define ANIM_AIM_R_BAZOOKA "b5b4a67d-0aee-30d2-72cd-77b333e932ef"
#define ANIM_AIM_L_BOW "46bb4359-de38-4ed8-6a22-f1f52fe8f506"
#define ANIM_AIM_R_HANDGUN "3147d815-6338-b932-f011-16b56d9ac18b"
#define ANIM_AIM_R_RIFLE "ea633413-8006-180a-c3ba-96dd1d756720"
#define ANIM_EXPRESS_ANGER "5747a48e-073e-c331-f6f3-7c2149613d3e"
#define ANIM_AWAY "fd037134-85d4-f241-72c6-4f42164fedee"
#define ANIM_BACKFLIP "c4ca6188-9127-4f31-0158-23c4e2f93304"
#define ANIM_EXPRESS_LAUGH "18b3a4b5-b463-bd48-e4b6-71eaac76c515"
#define ANIM_BLOWKISS "db84829b-462c-ee83-1e27-9bbee66bd624"
@FelixWolf
FelixWolf / gifplayer.lsl
Last active Dec 30, 2020
reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
View gifplayer.lsl
/******************************************************************************\
* Accepts textures in the following format:
* <somename>_cfg:<args> or <some name>cfg:<args>
* Valid args:
* m: Mode (See http://wiki.secondlife.com/wiki/LlSetTextureAnim)
* x: SizeX
* y: SizeY
* s: Start
* l: Length
* r: Rate
@FelixWolf
FelixWolf / mapgen.py
Last active Dec 25, 2020
This script will take a while to run because it has to download stuff
View mapgen.py
#!/usr/bin/env python3
#Mainland(Minus Zindra): 897 982 1130 1190
#Corsica: 1082 1101 1100 1158
#Gaeta 1: 1112 1140 1130 1155
#Gaeta 5: 1081 1160 1100 1190
#Nautilus: 1050 1108 1080 1137
#Satori: 1005 1099 1047 1134
#Heterocera: 1013 991 1036 1014
#Sansara: 974 982 1012 1038
#Bellisseria: 954 1024 977 1045
@FelixWolf
FelixWolf / slforums_thread_blocker.js
Last active Dec 14, 2020
Second Life Forums thread blocker
View slforums_thread_blocker.js
// ==UserScript==
// @name Thread blocker
// @namespace http://felix.softhyena.com/
// @version 0.1
// @description Block threads on the Second Life forums
// @author Chaser Zaks
// @match https://community.secondlife.com/forums/forum/*
// @grant none
// ==/UserScript==
@FelixWolf
FelixWolf / faecebook_adblocking.md
Last active Nov 1, 2020
Taking the aggressive approach to blocking ads on facebook
View faecebook_adblocking.md

How to prevent a big "inclusive" corperate entity from breaking ad blocking: Make them have to choose between money and being inclusivity. Also known as, abusing the aria field.

Step 1. Make a massive div tree selector to block ads

##div[data-pagelet]:has(> div > div > div > div > div > div > div > div > div > div > div > div > div > div > div > div > div > span > span > a[aria-label="Sponsored"])

Step 2. Make a massive div tree selector to block the annoying "people you may know" thing that shows me the opposite of people I know.

##div[data-pagelet]:has(> div > div > div > div > div > div > div > div > div > div > div > div > div > div > a[aria-label="See All"][href="/friends/"])
View filesystem.txt
header { //This must be equal to or less than chunksize, as the header it's self is a chunk
char[4] magic
uint16 version_major
uint16 version_minor
uint8 chunksize // Chunk size = 8 << chunksize
uint32 numchunks
// Pointers point to chunk IDs, not file offset! Chunk ID =
uint32 filetable_pointer
View llsd_parse.py
import xml.etree.ElementTree as ET
import uuid
import datetime
import base64
def parseLLSD(element):
if element.tag == "undef":
return None
elif element.tag == "boolean":
@FelixWolf
FelixWolf / teaEncryption.lsl
Last active Sep 17, 2020
Avg code speed: 5ms for "Hello, World"
View teaEncryption.lsl
//--------------------------------Byte Manipulation--------------------------------
list Base64ToBytes(string base64){
list result = [];
integer i;
integer l = llStringLength(base64);
for(;i<l;i+=4){
integer bytes = (llBase64ToInteger(llGetSubString(base64, i,i+4))>>8)&0xFFFFFF;
result += [bytes>>16, (bytes>>8)&0xFF, bytes&0xFF];
}
//TODO: Potential Speedup
View Base64ByteManipulation.lsl
list Base64ToBytes(string base64){
list result = [];
integer i;
integer l = llStringLength(base64);
for(;i<l;i+=4){
integer bytes = (llBase64ToInteger(llGetSubString(base64, i,i+4))>>8)&0xFFFFFF;
result += [bytes>>16, (bytes>>8)&0xFF, bytes&0xFF];
}
//TODO: Potential Speedup
//Instead of doing string comparison, consider checking length of input