Skip to content

Instantly share code, notes, and snippets.

View Lunaphied's full-sized avatar

Lunaphied Lunaphied

View GitHub Profile
@Lunaphied
Lunaphied / pylog.grc
Last active August 10, 2023 17:44
grc config for Python's default logging formatting
regexp=\[?INFO\]?
colours=cyan
=
regexp=\[?DEBUG\]?
colours=bold magenta
=
regexp=\[?WARN(ING)?\]?
colours=bold yellow
=
regexp=\[?ERR(OR)?\]?
@Lunaphied
Lunaphied / nix-manual-fix.js
Last active November 17, 2021 12:55
Fix Nix Help
// ==UserScript==
// @name Fix Nix Help - nixos.org
// @namespace Violentmonkey Scripts
// @match https://nixos.org/manual/*
// @grant none
// @version 1.0
// @author modwizcode
// @description Patches the Nix documention to actually have entries in the TOC for subcommands
// @require https://cdn.jsdelivr.net/npm/@violentmonkey/dom@1
// ==/UserScript==
###########################################################
# TX SX OS MIPS VM disassembler - by hexkyz and naehrwert #
###########################################################
import os
import re
import struct
host_calls_0 = {
0x8E943DA2 : "host_crc32 (ptr r4r5, len r6)",
/*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
[20:24:57] [Server thread/INFO]: modwizcode was blown up by modwizcode
[20:24:57] [Server thread/ERROR] [Sponge]: /**********************************************************************************************************************************************/
[20:24:57] [Server thread/ERROR] [Sponge]: /* Exception trying to process over a phase! */
[20:24:57] [Server thread/ERROR] [Sponge]: /**********************************************************************************************************************************************/
[20:24:57] [Server thread/ERROR] [Sponge]: /* PhaseContext : */
[20:24:57] [Server thread/ERROR] [Sponge]: /* - Name: CapturedExplosion */
[20:24:57] [S
@Lunaphied
Lunaphied / keybase.md
Created March 3, 2017 22:32
Keybase proof

Keybase proof

I hereby claim:

  • I am modwizcode on github.
  • I am modwizcode (https://keybase.io/modwizcode) on keybase.
  • I have a public key ASCjd17NOJP_rw_dwIjrrSPbb1yWDYBlEepOg9-g3YrW9wo

To claim this, I am signing this object:

bld.program(cxxflags = ['-std=c++14', '-O2', '-Wall', '-fsigned-char','-fno-exceptions', '-fno-rtti'],
ldflags = ['--pre-js', bld.path.get_bld().abspath() + '/app.preload.js',
'-s', 'TOTAL_MEMORY=218103808','--separate-asm', '-O2',
'-Wall', '-fsigned-char','-fno-exceptions', '-fno-rtti', '-s', 'SAFE_HEAP=1','--emrun',
'-s', 'ASSERTIONS=1'],
includes=['../third_party/', '.'],
source=source,
target='app')
std::string read_file ( const char* file_path )
{
std::ifstream in ( file_path, std::ios::in );
if ( in ) {
std::string contents;
in.seekg ( 0, std::ios::end );
contents.resize ( in.tellg() );
in.seekg ( 0, std::ios::beg );
in.read ( &contents[0], contents.size() );
std::string read_file ( const char* file_path )
{
std::ifstream in ( file_path, std::ios::in );
if ( in ) {
std::vector<char> contents;
in.seekg ( 0, std::ios::end );
contents.resize ( in.tellg() );
in.seekg ( 0, std::ios::beg );
in.read ( &contents[0], contents.size() );

Keybase proof

I hereby claim:

  • I am modwizcode on github.
  • I am modwizcode (https://keybase.io/modwizcode) on keybase.
  • I have a public key whose fingerprint is 0177 BD9E 8595 D10B FE34 F0C2 21B3 90CB 678D 9D45

To claim this, I am signing this object: