Skip to content

Instantly share code, notes, and snippets.

@daliacoss
daliacoss / gist:051c9141345846c8893cd864d14ead2d
Created April 12, 2022 18:41
ublock filters for twitter
twitter.com##div[aria-label^="Timeline: Trending now"]
twitter.com##div[data-testid^="DMDrawer"]
@daliacoss
daliacoss / redirector-yt.json
Created March 18, 2022 16:31
redirector rule for youtube shorts
{
"createdBy": "Redirector v3.5.3",
"createdAt": "2022-03-18T16:24:16.405Z",
"redirects": [
{
"description": "Youtube Shorts",
"exampleUrl": "https://www.youtube.com/shorts/TwFTdDTkmK8",
"exampleResult": "https://www.youtube.com/watch?v=TwFTdDTkmK8",
"error": null,
"includePattern": "https://www.youtube.com/shorts/*",
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
server_name my.website.here;
# point to Lightspeed-react instance
location / {
@daliacoss
daliacoss / im-gay.txt
Created September 6, 2018 20:19 — forked from lunasorcery/im-gay.txt
Compressed sprite data for the I'M GAY gba_bios.bin mod.
24 40 03 00 0F 00 40 01 01 00 01 42 42 43 43 C4
44 05 C4 04 C4 0F C4 02 0A 03 C3 01 0E 0C 08 0D
07 09 06 0B AA AB 48 75 EB B8 9C AA 0F FD 85 FA
4F 57 17 E9 79 E7 49 7C 5F 67 FD 47 FE 9C EE 24
FD ED 5F 46 94 57 7C 66 49 0B 40 84 0F AB 2B FA
57 67 24 DC A1 9F EC FF 2A 3E 54 F1 AD AB 52 C5
BE F2 75 91 82 81 2B D6 D6 8B 80 65 76 F2 3F EC
61 FF 1F 75 59 59 75 FC A2 24 D7 D6 0A 65 3C 11
E3 B3 66 A4 F9 5F 8E FF F9 BA FA 7F 10 A7 92 73
6E 39 4C 21 7F 9C 7F C4 FF AD FC B8 33 AE EE E2
#include <genesis.h>
const u16 PITCHES[12] = {
617,653,692,733,777,823,872,924,979,1037,1099,1164
};
struct {
u8 msb[12];
u8 lsb[12];
} pitchTable;
/*
periodically change the height (Y) of an object as it moves along the X or Z axis
(i.e., camera bob)
assumes you already have another script or function to move the object along X or Z
*/
class Bob : MonoBehaviour {
public float Amplitude = 0.3f; // the height of the bobbing effect
public float Wavelength = 1f; // how far the thing moves before the bob restarts
private Vector3 lastPosition;
using System;
using System.Collections.Generic;
class Graph : Dictionary<int,List<int>>{
public bool IsAccessible(int n1, int n2){
List<int> connections;
if (this.TryGetValue(n1, out connections)){
foreach (int i in connections){
if (i == n2){
tree = {'passage': [{'text':'this is some text'},
{'text':'this is some more text'},
{'strong': [{'text':'some bold text'},
{'link':[{'text':'some bold linked text'},{'italic':[{'text':'some italic linked bold text'}]}]}]}]}
subpassages = []
def traverse(t, formatting=[]):
f = formatting[:] #prevent changes by reference
key = t.keys()[0]
if key == "text":
#include <genesis.h>
const u16 PITCHES[12] = {
617,653,692,733,777,823,872,924,979,1037,1099,1164
};
struct {
u8 msb[12];
u8 lsb[12];
} pitchTable;
@daliacoss
daliacoss / local.js
Last active December 11, 2015 08:08
css macros for twee/twine
//local.js start
/*
a couple twee macros for basic css operations;
real javascript programmers should feel free to improve this
ps: i found these articles to be quite helpful:
http://eturnerx.blogspot.com/search/label/tweecode
http://www.lifeinneon.com/2013/01/17/reset-post-mortem/