Skip to content

Instantly share code, notes, and snippets.

@mtvee
mtvee / fossil.css
Last active January 3, 2016 02:09
fossil css
/* General settings for the entire page */
body {
margin: 0ex 1ex;
padding: 0px;
background-color: white;
font-family: verdana, ariel, sans-serif;
font-size: 13px;
}
a {
@mtvee
mtvee / fixtard.py
Last active January 3, 2016 15:29
Fix for fucktard injection of mal-intent inserted on php host files
#!/usr/bin/env python2
# Some fucker infected all the php files on the server with by injecting some
# obfuscated bullshit at the start of each file. This script pulls out the
# crap and rewrites the file.
import os
import fnmatch
import re
infection = {}
@mtvee
mtvee / txt2xp.py
Created February 27, 2016 13:37
Convert plain text to XP format used by REXPaint
#
# translate a plain text file into the REXPaint file format
#
# NOTE: seems to come out rotated -90 for some reason
# writing order is off? idk
import struct
INFILE = 'plain_text.txt'
OUTFILE = 'fancy_text.xp'
@mtvee
mtvee / image2xp.py
Last active November 20, 2022 17:11
convert an image to REXPaint xp or ascii, with optional resize
#
# translate an image file into the REXPaint file format
# or plain ascii
#
# requires: python 3+
# requires: pip install Pillow
#
# source: https://gist.github.com/mtvee/5629a2caa34dbf3ece95
# ---------------------------------------------------------------------------------
import os
@mtvee
mtvee / main.cpp
Last active September 19, 2023 07:22
cross platform socket example c/c++
#include<cstdio>
#include<cstring>
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#else
#include<unistd.h>
@mtvee
mtvee / punyforth.cpp
Last active July 26, 2020 15:37
A puny forth in c++ for no good reason
/*
* PunyForth
*
* Copyright 2020(c) mtvee
* All rights reserved.
*
* MIT License
*
* 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
@mtvee
mtvee / windowscpp.md
Created October 3, 2022 02:11
c++ from command line in windows

How to build c++ from the command line in windows 10

The rest of all this is done from the shell and any editor

  • make a junk directory somewhere and put these files into it