Skip to content

Instantly share code, notes, and snippets.

View Qix-'s full-sized avatar
💻
Making an OS @oro-os

Josh Junon Qix-

💻
Making an OS @oro-os
View GitHub Profile
@Qix-
Qix- / readme.md
Last active March 30, 2024 10:29

This is a diff between the xz-embedded repositories listed on github and at git.tukaani.org.

$ git remote -v
github  https://github.com/tukaani-project/xz-embedded (fetch)
github  https://github.com/tukaani-project/xz-embedded (push)
origin  https://git.tukaani.org/xz-embedded.git (fetch)
origin  https://git.tukaani.org/xz-embedded.git (push)
@Qix-
Qix- / scurl.sh
Last active March 7, 2024 10:43
Safe cURL - pipe your cURL-obtained scripts into this and pass it a sha256 to verify against. Comes with a pure-bash sha256 implementation.
#!/usr/bin/env bash
# Usage: curl https://some-site-with-potential-mitm.com/script.sh | scurl $verified_sha256_digest_of_script
# Released into the Public Domain.
# Written by Josh Junon (josh@junon.me) <github.com/qix->
# Original SHA256 implementation in C by Brad Conte (brad@bradconte.com) <https://github.com/B-Con/crypto-algorithms>
# Ported to (almost) pure Bash by Josh Junon
@Qix-
Qix- / ohai.gif
Last active October 16, 2023 16:04
ohaider
ohai.gif
@Qix-
Qix- / coro.cpp
Created September 29, 2020 04:16
C++20 coroutines + LibUV sample, v2
// Thank you to the folks at the C++ slack channel,
// along with @lewissbaker for the excellent literature
// (even though it took me a few days to be convinced
// it really was so).
#include <uv.h>
#include <iostream>
#include <experimental/coroutine>
@Qix-
Qix- / FIMImporter.cs
Last active July 16, 2023 06:11
The "F**cking Import my Mesh!!!" (.FIM) format for exporting from Blender to Unity.
using UnityEngine;
using UnityEditor.AssetImporters;
using System;
using System.IO;
using System.Text.RegularExpressions;
using System.Collections.Generic;
[ScriptedImporter(1, "fim")]
public class FIMImporter : ScriptedImporter
{
@Qix-
Qix- / sha256.sh
Last active July 10, 2023 10:00
SHA256 in (mostly) pure Bash script
#!/usr/bin/env bash
# Released into the Public Domain.
#
# Original implementation in C by Brad Conte (brad@bradconte.com) <https://github.com/B-Con/crypto-algorithms>
# Ported to Bash (lol) by Josh Junon (josh@junon.me) <https://github.com/qix->
#
# Yes, it's absolutely as slow as it looks.
#
# The only external dependency it has is on a utility called `od`,
@Qix-
Qix- / fruitandveg-de.md
Last active April 3, 2023 08:09
Eclectus Foods

Von http://eclectusparrots.net/fruitandveg.html

Gemüse

  • Artischocke
  • Bete und Blätter (nährstoffreicher)
  • Bohnen (frisch, nicht getrocknet)
  • Borretsch (Art von Grünkohl)
  • Bok Choy (jede asiatische grüne Sorte)
  • Capsicum und Samen, alle Farben (rot enthält besonders viel Vitamin A, insbesondere die Samen)
@Qix-
Qix- / libuv.zig
Created March 26, 2020 20:56
Simplistic libuv wrapper example in Zig
const std = @import("std");
const warn = @import("std").debug.warn; // XXX DEBUG
const assert = std.debug.assert;
const c = @cImport({
@cInclude("uv.h");
});
pub const UVError = error{ E2BIG, EACCES, EADDRINUSE, EADDRNOTAVAIL, EAFNOSUPPORT, EAGAIN, EAI_ADDRFAMILY, EAI_AGAIN, EAI_BADFLAGS, EAI_BADHINTS, EAI_CANCELED, EAI_FAIL, EAI_FAMILY, EAI_MEMORY, EAI_NODATA, EAI_NONAME, EAI_OVERFLOW, EAI_PROTOCOL, EAI_SERVICE, EAI_SOCKTYPE, EALREADY, EBADF, EBUSY, ECANCELED, ECHARSET, ECONNABORTED, ECONNREFUSED, ECONNRESET, EDESTADDRREQ, EEXIST, EFAULT, EFBIG, EHOSTUNREACH, EINTR, EINVAL, EIO, EISCONN, EISDIR, ELOOP, EMFILE, EMSGSIZE, ENAMETOOLONG, ENETDOWN, ENETUNREACH, ENFILE, ENOBUFS, ENODEV, ENOENT, ENOMEM, ENONET, ENOPROTOOPT, ENOSPC, ENOSYS, ENOTCONN, ENOTDIR, ENOTEMPTY, ENOTSOCK, ENOTSUP, EPERM, EPIPE, EPROTO, EPROTONOSUPPORT, EPROTOTYPE, ERANGE, EROFS, ESHUTDOWN, ESPIPE, ESRCH, ETIMEDOUT, ETXTBSY, EXDEV, UNKNOWN, EOF, ENXIO, EMLINK };
@Qix-
Qix- / EveryNoiseCopy.user.js
Created April 11, 2021 16:52
Ctrl+Click on tracks from EveryNoise.com to copy the artist/title from the "title" attribute
// ==UserScript==
// @match https://everynoise.com/*
// ==/UserScript==
function attachCSS(css) {
const element = document.createElement('style');
element.setAttribute('type', 'text/css');
if ('textContent' in element) {
element.textContent = css;
@Qix-
Qix- / icns.cmake
Created January 26, 2019 01:05
Build an ICNS based off a single PNG (ImageMagick) or SVG image (Inkscape)
# LICENSE: CC0 - go nuts.
# Hi :) This is what I used to generate the ICNS for my game, Tide.
# Both input formats (SVG vs PNG) work just fine, but in my experience
# the SVG came out with noticeably better results (although PNG wasn't
# a catastrophe either). The logo for the game was simple enough that
# SVG was indeed an option.
# To use:
#