Skip to content

Instantly share code, notes, and snippets.

@Xananax
Xananax / userChrome.css
Last active July 15, 2024 09:53
Hide firefox top toolbar
/**
* Put in your profile directory
* Which you can find through `help > more troubleshooting information` then clicking "Open profile"
* create a directory "chrome", then a file "userChrome.css", and paste the below.
* You'll also need to go to `about:config` and set `toolkit.legacyUserProfileCustomizations.stylesheets` to `true`
**/
/** hide actual tabs **/
#TabsToolbar > .toolbar-items {
display: none;
@Xananax
Xananax / first.md
Created May 10, 2024 09:13
No generator markdown static site generator

A title

some text and a link

An experiment in the smallest code possible full-markdown blog possible

@Xananax
Xananax / simple-shader.c
Created November 9, 2022 17:21
Shaders code
shader_type canvas_item;
uniform float PI = 3.14159;
uniform float SLIDER_VALUE : hint_range(0.0, 1.0) = 0.5;
void fragment() {
vec3 value = cos(mix(0.0, PI * 2.0, SLIDER_VALUE) + UV.x + vec3(0, 2 , 4));
COLOR = vec4(0.5 + 0.5 * value, 1.0);
}
@Xananax
Xananax / mdsvex.config.js
Created September 1, 2021 17:31
MDSvex Global Components
import remarkAbbr from 'remark-abbr'
import rehypeSlug from 'rehype-slug'
import rehypeAutolinkHeadings from 'rehype-autolink-headings'
import md from 'mdsvex'
export const extensions = ['.svelte.md', '.md', '.svx']
export const mdsvex = md.mdsvex({
extensions,
smartypants: {
@Xananax
Xananax / recommendations.md
Last active June 7, 2021 21:20
Recommendations for Itch Palestine Bundle

Xananax's recommendations

For the Itch Bundle for Palestine

Currently standing at > 1000 games for $5.

The below is a list of games from the bundle I have personally bought at full price, played, and can easily recommend.

To be clear, I own many more games from the bundle, and many of these are good; but these are no-hesitation recommendations.

@Xananax
Xananax / tree-html.sh
Last active February 7, 2021 01:26
Directory structure to HTML with collapsible directories
#!/usr/bin/env bash
# Ever needed to send a collapsible list of files to someone?
# Boy do I have good news for you
# usage: run it in the dir
# requires tree
read -r -d '' HEAD << EOM
<html>
<head>
<title>Tree</title>
static func get_dir_contents(path):
var dir = Directory.new()
assert(dir.open(path) == OK,"directory `%s` is not valid"%[path])
dir.list_dir_begin(true, true)
var files = []
var file_name = dir.get_next()
while file_name != "":
if not dir.current_is_dir() and file_name.get_extension() == 'gd':
var c = ThingToLoad.new(dir, file_name)
files.push_back(c)
@Xananax
Xananax / remove-nouveau-on-fedora.md
Created April 19, 2020 11:37
Remove Nouveau on Fedora

Remove Nouveau on Fedora

First:

sudo vim /etc/modprobe.d/blacklist-nouveau.conf

Write:

@Xananax
Xananax / make_bobbybeads_cart_behave.js
Created February 29, 2020 19:30
Make Bobby Beads Cart Reorderable with Bigger Images
/*https://github.com/SortableJS/Sortable*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sortable=e()}(this,function(){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(){return(a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function I(i){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},e=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.forEach(function(t){var e,n,o;e=i,o=r[n=t],n in e?Object.defineProperty(e,
@Xananax
Xananax / reset.css
Last active November 18, 2020 08:52
Useful CSS Reset
/**
copied from: https://meowni.ca/posts/monica-dot-css/ & https://hankchizljaw.com/wrote/a-modern-css-reset/
**/
/* Box sizing rules */
*, *::before, *::after {
box-sizing: border-box;
}
/* Remove default padding */