Skip to content

Instantly share code, notes, and snippets.

View mxamber's full-sized avatar

Amber Alex mxamber

View GitHub Profile
@mxamber
mxamber / EngineSoundScript.py
Last active October 5, 2015 16:20
A small script for Blender Game Engine Python to change the pitch of the car engine sound depending on the speed of the car.
def engineSound ():
from bge import logic
cont = logic.getCurrentController()
# Name of the Sound Actuator playing your sound
sound = cont.owner.actuators["enginesound"]
# Replace "Car" with the Name of your car
speed = abs(round(sum(scn.objects["Car"].linearVelocity), 2) * 0.25)
@mxamber
mxamber / backup_panel.py
Last active January 9, 2016 15:03
This script adds a "backup your work"-button to the object properties. When clicked, the object will be copied to layer 20 and renamed <object name>_Backup_<date and time>
import bpy
import datetime
class BackupPanel(bpy.types.Panel):
"""Creates a Panel in the Object properties window"""
bl_label = "Backup"
bl_idname = "OBJECT_PT_backup"
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "object"
function download() {
var IDs = [];
var users = [];
var elements = Array.prototype.slice.apply(document.querySelectorAll("div[role='listitem'] div[data-user-id][data-screen-name].ProfileCard"));
elements.forEach(function(element) {
var user = {id: element.getAttribute("data-user-id"), name: element.getAttribute("data-screen-name")};
IDs.push(user.id);
users.push(user);
});
@mxamber
mxamber / blocklist_export.js
Created June 19, 2019 11:53
run this in the console on a twitter user's following / follower page to export the IDs of all their followers / followeds in a format suitable for blockchain import
var IDs = [];
var users = [];
var result = '{"users":[\n';
var elements = Array.prototype.slice.apply(document.querySelectorAll("div[role='listitem'] div[data-user-id][data-screen-name].ProfileCard"));
elements.forEach(function(element) {
var user = {id: element.getAttribute("data-user-id"), name: element.getAttribute("data-screen-name")};
IDs.push(user.id);
result += '{"id":"' + user.id + '"},\n';
});
@mxamber
mxamber / ao3_stats.js
Created August 31, 2019 02:37
A Tampermonkey userscript to display some stats on AO3: the percentage of all visitors (hits) that left a kudo, comment, or bookmarked the story.
// ==UserScript==
// @name AO3 Stats
// @namespace http://tampermonkey.net/
// @version 1.0
// @description display ao3 stats
// @author mxamber
// @match https://archiveofourown.org/works/*
// @grant none
// ==/UserScript==
@mxamber
mxamber / stan_handles.html
Last active April 4, 2020 14:32
A little HTML/Javascript thingy that generates fake "stan Twitter" usernames.
<!doctype HTML>
<html>
<head>
<title>Stan Twitter Name Generator</title>
<style>
html {
background: #666;
}
#main {
@mxamber
mxamber / morsetrainer.htm
Last active May 20, 2021 00:23
A primitive trainer helping learn morse. Will present characters from the Latin and Morse alphabets and display the correct equivalent after the user submits their own answer.
<!doctype HTML>
<html>
<head>
<title>morse code trainer</title>
<meta name="title" content="morse corde trainer">
<meta name="description" content="a simple morse code trainer to learn the morse alphabet">
<meta name="author" content="https://gitub.com/mxamber">
<meta charset="UTF-8">
<link rel="icon" type="data:image/png" href=" data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5QUSFxIo7IVdKQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAABlElEQVR42u3dO46DMBRAUTOaDrZD/7wZNuA9wQahdqop0owCmfAZzpHcBb0oviKJG5paa03c1pePQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACQAAIAAEgAASAABAAAkAACAABIAAEgAAQAAJAAAgAASAABIAAEAACYF/fr76waZpD3+jVHmxylc/LHcBXAAJAAAgAASAABIAAuInGs4PdARAAAkAACAABXMs0TSnnnLque1o55zRN02VmHKZeWCmlppR+XaWU0884UvrPm//uBu0xQwAbjOP48sb8rHEcTzdDABtFxOrNiYjTzTiDSx4Fd12XlmVZdU3btmme51PN8C8AASAABLBO3/cfv2aPGQLYaBiGj1+zxwwngQ6CnAM4ChbA26eCEVHbtn1aEfFnJ3N7zHAQhB+BCAABIAAEgAAQAAJAAAgAASAABIAAEAACQAAIAAEgA
@mxamber
mxamber / twitter_old_buttons.user.css
Last active May 6, 2022 11:58
Custom CSS to revert Twitter's follow/unfollow buttons to the old styles
/*
* Twitter Follow/Unfollow buttons
* revert to old style via custom CSS
* Author: mxamber
* Website: https://github.com/mxamber
* Version: 1.2
* Date: 2021-08-11
* Updated: 2021-08-12
*/
@mxamber
mxamber / transphobesearch.user.js
Last active March 15, 2022 15:16
Userscript that adds a "is a transphobe?" link to every user profile on Twitter to quickly look up a person's position on transgender rights before interacting with them.
// ==UserScript==
// @name Twitter Transphobe Search
// @namespace http://tampermonkey.net/
// @version 0.4
// @description Find trans-related tweets from any public user
// @author mxamber
// @match https://twitter.com/*
// @icon https://www.google.com/s2/favicons?domain=twitter.com
// @grant none
// ==/UserScript==
@mxamber
mxamber / fedititle.user.js
Created May 3, 2022 11:09
Changes the tab title of Mastodon-based Fediverse instances in real time according to what's displayed (toot text)
// ==UserScript==
// @name Fedi Tab Title
// @version 0.1
// @grant none
// @description Dynamic tab title for Mastodon-based Fediverse instances.
// @author mxamber
// ==/UserScript==
/*