Skip to content

Instantly share code, notes, and snippets.

@Sembiance
Sembiance / vivaldi.css
Created February 2, 2024 13:40
Add Netscape throbber to Vivaldi
/* Vivaldi doesn't show any animated throbber when loading a page, it just changes the 'reload' button to a 'stop' button
These two sections replace the 'stop' button image with an old school netscape animated throbber */
.button-toolbar button[title='Stop']
{
background-image: url('data:image/gif;base64,R0lGODlhHgAeAMQAAP///1VVVdwAAHd3dzOZZQCY/IiIiJn//8zMzN3d3SIiIkRERDExZDFkZBEREaqqqru7u+7u7gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QSACgAAACwAAAAAHgAeAIT///93d3cAl/wxMWSZ//+IiIgiIiIxZGQzmWTcAADu7u7MzMzd3d2qqqq7u7tERERVVVUREREAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAF/6ARSYZkStGIqmdpPAUAFNBomyVqqqm4RgaIw/EwGG2BFKkUKdggop7IkDgamTUfjhkJ7FzX7uM03t18rPLql2r3CDJAA9hTwuOEqbttHCxkc3sRBw9/CwciD0ADEUVRKXcNEgN6IwIAByiPfFcid3KdR5cHQFcBnQOnngCRpQaMo4tGAZS1lEZwAXcFr68Ro1e3BgfCA5RwBroyvL2jta+ItcTDBsjJu5QHwAPTz9nDA8iUBQoypwPO0K/GB8TtxwDQA+TmBs7v7dD4xnDc7/QAAlxCMKCBA3bcErZr18+dsQBx7i1c6K8inAMIBCDIeABixIkgF2ZEcBFRpy5xEDxoUwlSY7sRcE6wOCETyEqMxNpIEABHACmaQINSU2KCQRwADGY
@Sembiance
Sembiance / Program.cs
Last active August 20, 2023 20:34
Program that leverages CUE4Parse to extract all assets from unreal engine PAK files
using System;
using System.Collections.Generic;
using System.CommandLine;
using System.ComponentModel;
using System.IO;
using System.Text.Json;
using SkiaSharp;
using CUE4Parse.Encryption.Aes;
using CUE4Parse.FileProvider;
using CUE4Parse.FileProvider.Objects;
@Sembiance
Sembiance / dl2gl.c
Created May 28, 2021 19:33
C code that converts a DL file to GL
/*
* dltogl.c -- convert .DL animations into .GL animations.
*
* usage: dltogl file.dl [file.gl]
*
* If no .gl file is specified, the images and control file will be
* written to separate files. The control file will always be "dl.txt",
* the images "clpN.clp" and a palette file called "palette.pic".
*
* Author:
@Sembiance
Sembiance / kygload.c
Created May 15, 2021 19:32
kygFormat image parsing code
/*
--- Kyss presents ---
kygload.c : Kyss graphics format loader
Last update : 1992-02-28 version 0.10
for "TOWNS-GCC"
*/
@Sembiance
Sembiance / tesnorServer.py
Created March 19, 2021 15:07
Example lobe.ai tensor server using Flask
import os
import logging
from PIL import Image
from flask import Flask, request, jsonify
from TensorModel import TensorModel
app = Flask(__name__)
logging.getLogger('werkzeug').setLevel(logging.WARNING)
@Sembiance
Sembiance / gimp-appimage-2.10.21_p20200924.ebuild
Created October 1, 2020 19:10
Gentoo ebuild for GIMP AppImage version with resynthesizer
EAPI="7"
DESCRIPTION="GNU Image Manipulation Program - AppImage version with Resynthesizer plugin"
HOMEPAGE="https://github.com/aferrero2707/gimp-appimage"
MY_PV="${PV/_p/-}"
APPIMAGE_FILENAME="GIMP_AppImage-git-${MY_PV}-withplugins-x86_64.AppImage"
SRC_URI="https://github.com/aferrero2707/${PN}/releases/download/continuous/${APPIMAGE_FILENAME}"
S="${WORKDIR}"
@Sembiance
Sembiance / test.c
Created July 24, 2020 18:49
Test abydos crash
// Place in current working directory: https://telparia.com/fileFormatSamples/image/SPRITESCO.ABK
// Compile with: gcc -I/usr/include/cairo -I/usr/include/abydos -lm -lcairo -labydos-0.2 -o test test.c
// Run as: ./test
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <assert.h>
@Sembiance
Sembiance / validate.js
Created October 22, 2012 14:40
Sample JSON validation
var jsonSchema = require("json-schema");
var mySchema = { name : "test", type : "object", additionalProperties : false, properties : { fullName: { type : "string" } } };
var myObject = { fullName : "John Doe" };
var schemaResult = jsonSchema.validate(myObject, mySchema);
if(!schemaResult.valid)
return schemaResult.errors;
@Sembiance
Sembiance / advanced_object.json
Created January 13, 2012 19:39
JSON objects, schema and benchmark code
{
fullName : "John Doe",
age : 47,
state : "Massachusetts",
city : "Boston",
zip : 02201,
married : false,
dozen : 12,
dozenOrBakersDozen : 13,
favoriteEvenNumber : 14,
@Sembiance
Sembiance / redis-key-stats.c
Created October 3, 2011 23:54
C program using hiredis to gather key statistics from a redis server
/*
1. Install hiredis:
git clone git://github.com/antirez/hiredis.git
cd hiredis
make
make install
2. Build C program:
gcc -o redis-key-stats -lhiredis -I/usr/local/include/hiredis redis-key-stats.c