Skip to content

Instantly share code, notes, and snippets.

/*
//Sample genetic-ish algorithm
Original:
[[0, 0
[0 .
.
. ]
0]]
Desired:
@oldmud0
oldmud0 / gist:ee5ab901416a11692b8271f8b2f2e67f
Created July 18, 2016 02:51
AWS server after a year of uptime
July 3, 2015 at 2:51:07 PM UTC-5
Cloud-init v. 0.7.5 finished at Fri, 14 Aug 2015 00:02:57 +0000. Datasource DataSourceEc2. Up 10.11 seconds
Ubuntu 14.04.3 LTS ip-172-31-0-155 ttyS0
ip-172-31-0-155 login: Sun Jul 3 03:35:06 UTC 2016: shutting down for poweroff [up 28006338s].
@oldmud0
oldmud0 / errors.txt
Last active October 29, 2016 04:32
Fix them!
lua\entities\gmod_wire_egp\lib\egplib\transmitreceive.lua:19:7: expected expression near '!'
lua\entities\gmod_wire_egp\lib\egplib\usefulfunctions.lua:17:6: expected expression near '!'
lua\entities\gmod_wire_egp\lib\objects\3dtracker.lua:69:27: empty if branch
lua\entities\gmod_wire_egp\lib\objects\text.lua:47:7: expected expression near '!'
lua\entities\gmod_wire_egp\lib\objects\textlayout.lua:26:7: expected expression near '!'
lua\entities\gmod_wire_egp\lib\objects\wedge.lua:8:59: expected ')' near '!'
lua\entities\gmod_wire_egp\lib\objects\wedgeoutline.lua:8:59: expected ')' near '!'
lua\entities\gmod_wire_egp_emitter.lua:93:6: expected expression near '!'
lua\entities\gmod_wire_egp_hud\cl_init.lua:81:13: expected ')' near '!'
lua\entities\gmod_wire_egp_hud\huddraw.lua:11:8: expected expression near '!'
set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/
" Always show statusline
set laststatus=2
" Use 256 colours (Use this setting only if your terminal supports 256 colours)
set t_Co=256
syntax on
@oldmud0
oldmud0 / vrouter.md
Last active April 2, 2017 02:46
vRouter proposal

A few days ago, it appeared to me that a virtual router software did not exist at all. Expensive Cisco software for simulating Cisco equipment exists, but it is used solely for their cert exams and labs. Router companies only offer blank/skeleton versions of their router's web configuration pages, but it does not offer a way to test routers without actually breaking them. Enter vRouter.

vRouter, if the project ever takes off, is an open-source project written in Qt intended to develop virtual networks based off real hardware from routers of every tier. Whether you want to test the stability of the newest DD-WRT firmware for your exact router model or need to assess a new configuration before deploying it to production routers, vRouter strives to replicate the workings of the vast variety of routers out there to make your job easier.

vRouter can let you build a network of any size and integrate it with existing networks. You can bridge your virtual network with virtual machines running in common virtual

@oldmud0
oldmud0 / aorules.md
Last active July 12, 2017 00:42
Attorney Online Discord Rules

New general rules:

  • Apply common sense, if you have any.
  • Keep trolling contained. This means when there is a serious conversation going on, you keep it serious.
  • Criticism must be constructive, except in dire cases of irony.
  • No spamming, except in #spam.
  • No excess memery or dead, unfunny memes except in #memes.
  • No NSFW content in any channel, except for role-playing in #nsfw-erp.
  • No stalking, harassment, or excess profanity.
# Ever wonder what all those optional updates are? There's an easy way to find out.
# Step 1: Go to Control Panel > Windows Update > Show optional updates.
# Step 2: Select all the updates you want to find the title of, then copy the update details.
# Step 3: Remove all the cruft and only leave the links.
# Step 4: Replace http with https and /kb/xxx with /api/content/kb/xxx.
# Step 5: Save the list of links.
# Step 6: Open up an MSYS shell and do the following (replace the .txt files with your own):
# (note: this will require curl and perl)
while read fn; do curl $fn -Lso - | perl -l -0777 -ne 'print $1 if /<h1.*?title=\"(.*?)\".*?>.*?/si'; done < '/r/updates.txt' > /r/updates_new.txt
@oldmud0
oldmud0 / music2yaml.py
Last active September 6, 2019 07:38
Extracts songs from the AO2 music folder into a YAML file for tsuserver3
"""
Extracts songs from the AO2 music folder into a yaml file for tsuserver3.
This script will look through the music files present in the given music folder
and add/update the respective song lengths in the music.yaml. It will preserve
the category and positioning of existing tracks, while new tracks are added
to the "Uncategorized" category.
You can also create a fresh music.yaml with this script.
@oldmud0
oldmud0 / widgetdumper.cpp
Last active December 21, 2020 04:21 — forked from pjwhams/qtdumper.cpp
Dump size and position of Qt QWidgets and QLayouts
#include "widgetdumper.h"
#include <sstream>
#include <string>
#include <iostream>
#include <stdio.h>
#include <QtWidgets/QLayout>
#include <QtWidgets/QWidget>
#if _MSC_VER
@oldmud0
oldmud0 / ao2-rite-of-passage.md
Last active February 5, 2021 23:37
The AO2 Rite of Passage

THE AO2 RITE OF PASSAGE

For epochs, the secrets of how to correctly compile AO2 was buried in the mind of its creator. After over 12 painstaking hours experimenting, compiling, and pacing around my room aimlessly, I succeeded the rite of passage, and I, too, gained the power to compile AO2 into a single executable of less than 10 MB in size.

I shared this power with great care. But as my involvement in AO2 dwindles and the community yearns for their own clients and their own features, and I look through ZIP files in disgust as dozens of DLLs are strewn all over, I have decided to divulge the secrets of how to compile AO2 statically.

With this powerful guide, you can complete the AO2 rite of passage in three hours or less.

Dependencies