Skip to content

Instantly share code, notes, and snippets.

View ghostdevv's full-sized avatar
🍋
Well, when, life, gives, you, lemons;

Willow (GHOST) ghostdevv

🍋
Well, when, life, gives, you, lemons;
View GitHub Profile
@ghostdevv
ghostdevv / README.md
Last active August 22, 2025 17:19
BlueSky Location Mocking User Script

Warning

This may potentially violate BlueSky's ToS, or even local laws. As such it's probably best that you just don't use BlueSky for DMs until someone invents a time machine. If you decide to use this anyway, I'm certainly not responsible. I just did this for the funsies!

This ViolentMonkey user script intercepts the fetch request to https://bsky.app/ipcc which, if you're in the UK, has a response like this:

{"countryCode":"GB","isAgeRestrictedGeo":true}

All we actually need to do is set isAgeRestrictedGeo to false, but you might as well move countries while you're at it.

@ghostdevv
ghostdevv / create-user.sh
Last active July 9, 2025 23:11
create-user-script
#!/bin/bash
# Check if script is run with root privileges
if [ "$EUID" -ne 0 ]; then
echo "Please run this script as root or with sudo"
exit 1
fi
# Function to validate username
validate_username() {
@ghostdevv
ghostdevv / install.sh
Last active November 30, 2024 23:22
pi-install
#!/bin/bash
set -e
echo Updating
sudo apt update
if ! command -v jq &> /dev/null; then
echo Installing jq
sudo apt-get install jq
@ghostdevv
ghostdevv / flat.ts
Created November 21, 2024 01:50
flat array
function flat<T extends any[], D extends number = 1>(array: T, depth?: D): FlatArray<T, D>[] {
return typeof depth == 'undefined' || depth > 0
? array.reduce((a, x) => a.concat(Array.isArray(x) ? flat(x, (depth ?? 1) - 1) : x), [])
: array
}
@ghostdevv
ghostdevv / theme.css
Created May 23, 2024 18:23
test revealjs theme
/**
* A simple theme for reveal.js presentations, similar
* to the default theme. The accent color is darkblue.
*
* This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed.
* reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
*/
@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap");
section.has-dark-background, section.has-dark-background h1, section.has-dark-background h2, section.has-dark-background h3, section.has-dark-background h4, section.has-dark-background h5, section.has-dark-background h6 {
color: #fff;
@ghostdevv
ghostdevv / README.md
Last active January 12, 2024 19:16
CC Turtle Fuel Command

Fuel Command

Simple command to check the fuel level of the turtle.

Installation

wget https://gist.githubusercontent.com/ghostdevv/366cce6995906d6dce8b15ca13a8aad4/raw/8085d548d0ab634cc22dfc24bd98350989e4d9e6/fuel.lua
@ghostdevv
ghostdevv / tsconfig.json
Created December 7, 2023 23:22
simple tsconfig
{
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"noEmit": true,
"strict": true,
"target": "es2022",
"module": "node16",
"moduleResolution": "node16", // or bundler depending
"allowSyntheticDefaultImports": true
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
document.write(`<pre>${JSON.stringify({ width: window.innerWidth, height: window.innerHeight }, null, 2)}</pre>`)
@ghostdevv
ghostdevv / ReorderableList.svelte
Last active December 10, 2022 05:27
Svelte Reorderable list
<script lang="ts">
import { faGripLines } from '@fortawesome/free-solid-svg-icons';
import Fa from 'svelte-fa';
type List = $$Generic<Array<any>>;
export let list: List;
let hovering: number | null = null;