Skip to content

Instantly share code, notes, and snippets.

View skurmedel's full-sized avatar
📽️
C++ & Graphics

Simon Otter skurmedel

📽️
C++ & Graphics
View GitHub Profile
@skurmedel
skurmedel / spotify-title.cpp
Created May 14, 2017 21:54
Dumps the title of the Spotify window every 30 seconds. Mostly an example, but could be used for something. (Windows only)
#include <cstdio>
#include <string>
#include <vector>
#include <Windows.h>
#include <Psapi.h>
#include <algorithm>
#include <chrono>
#include <thread>
@skurmedel
skurmedel / wgetopt.c
Created February 8, 2015 08:56 — forked from superwills/getopt.c
Converted to wchar_t variant, so that when you are cursed with Windows wchar_t stuff, you can still getopt unicode args.
// Put this in a separate .h file (called "getopt.h").
// The prototype for the header file is:
/*
#ifndef GETOPT_H
#define GETOPT_H
int wgetopt(int nargc, wchar_t * const nargv[], const wchar_t *ostr) ;
#endif
*/
@skurmedel
skurmedel / inputsim.c
Last active August 29, 2015 14:14
Windows 7 utility. inputsim "window name" "some unicode å†Â" sends "some unicode å†Â" as keyboard input to the open window "window name".
/*
The MIT License (MIT)
Copyright (c) 2015 Simon Otter
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
copies of the Software, and to permit persons to whom the Software is
@skurmedel
skurmedel / gamer_part_name.py
Last active February 27, 2017 02:32
Generates Gam3r part names. Sometimes gives legit names. Now with more Phantom.
import argparse
import sys
import random
from types import SimpleNamespace
import string
manufacturers = ["ASUS", "ASrock", "Acer", "MSI", "Gigabyte", "XFX", "BFG", "Corsair", "EVGA", "ZOTAC", "Razer"]
words = {"X", "KILLER", "Sniper", "Ghost", "Adder", "Viper", "Stalker", "Force", "Gh0st", "Slayer", "Essence", "Razor", "Eraser", "Sweeper", "Blaster", "1337", "Storm", "One", "Quantum", "Quark", "Atom", "Slicer", "Millenium", "Phantom", "Hydra", "Droid", "Robot", "Phoenix", "Cyclops", "Hercules", "Caesar", "Green Beret", "Ocean", "Wave", "Break", "Destroyer", "Fighter", "Missile", "Naga", "Thor", "Odin", "Mjolnir", "Battle", "Ogre", "Lightning", "Hurricane", "Tornado", "Cloaked", "Slipstream", "Flash", "Titan", "Core", "Avalanche", "Thunder", "Panzer", "PENETRATOR", "Fatal1ty", "Pro", "Death", "Dread", "COMBAT", "Z", "OPS", "SPECIAL", "Commando", "Marine", "Red", "Gamer", "Trinity", "Unity", "Zero", "Steel", "Havoc", "Apocalypse", "Tiger", "Sabre", "Sword", "Mace", "Axe", "Spear", "Terminator", "Alien", "Dr
@skurmedel
skurmedel / timecube.py
Created January 23, 2015 12:03
Quotes timecube.com
from urllib.request import *
from html.parser import HTMLParser
import sys
import os
import random
class _TimecubeParser(HTMLParser):
def __init__(self):
super().__init__(self)
self.in_span = False
@skurmedel
skurmedel / mojibakifier.py
Last active August 29, 2015 14:14
A little python module and script that makes text much less legible by character encoding conversions and random bit flipping. The bit flipping is not deterministic so you can run it several times and get different results. Works best with languages other than English.
# Invoke as:
# python mojibakifier.py
#
# For example:
# echo "Hello" | python mojibakifier.py
#
# Todo:
# - Flag for bit_rot
import string