Skip to content

Instantly share code, notes, and snippets.

View mikroskeem's full-sized avatar
👻

Mark Vainomaa mikroskeem

👻
View GitHub Profile
@domnikl
domnikl / LICENSE
Last active July 11, 2024 08:28
C function to dump memory
Copyright 2018 Dominik Liebler
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 furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR O
@joepie91
joepie91 / vpn.md
Last active May 13, 2025 02:51
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@artizirk
artizirk / hax.py
Created September 10, 2015 07:43
CodeClub: Python - 2. September
#!/usr/bin/env python3
fast_code = r"""
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
//#define MAX 10000
@ewized
ewized / statusping.py
Last active January 26, 2024 02:18
Python3 class to ping a Minecraft server and get its response including ping in ms
#!/usr/bin/python3
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
@DarkSeraphim
DarkSeraphim / Omigosh.java
Created July 16, 2015 16:18
Time for change, SpigotMC
package someone.events;
import someone.Main;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
@vladignatyev
vladignatyev / progress.py
Last active December 2, 2024 17:14
Python command line progress bar in less than 10 lines of code.
# The MIT License (MIT)
# Copyright (c) 2016 Vladimir Ignatev
#
# 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 furnished to do so, subject to the following conditions:
#
@nogweii
nogweii / draft.md
Last active July 14, 2017 17:08
rough draft for why arch linux doesn't work with Gen2 HyperV machines

3 issues are present immediately when trying to install Archlinux in a Gen2 HyperV VM:

  1. Keyboard doesn't work. See http://www.gossamer-threads.com/lists/linux/kernel/1985855 for more details.
  2. The network doesn't work. See http://www.hurryupandwait.io/blog/running-an-ubuntu-guest-on-hyper-v-assigned-an-ip-via-dhcp-over-a-wifi-connection for more details.
  3. When you do try to do network operations, there are checksum errors. See http://forge.univention.org/bugzilla/show_bug.cgi?id=33160 for more details.

To solve the keyboard, you need to enable the SERIO_I8042 kernel module. Which won't autoload (when it's set to =M in Kconfig) as HyperV gen2 images don't virtualize any PS/2 devices. And due to a missing dependency, hyperv_keyboard.ko can't load without it. (https://bugs.archlinux.org/task/39820 for some more details.)

The network doesn't work at all, as the traffic isn't getting outside of the VM. This is the case with other Linux VMs, and isn't necessarily Arch's fault. Sharing the n

@danielkza
danielkza / fedora-bfq.py
Last active May 2, 2017 15:23
Script to build a BFQ-patched kernel from Fedora packages
#!/usr/bin/env python2.7
from __future__ import print_function
import sys
import os.path
import re
import shutil
from glob import glob
from HTMLParser import HTMLParser
from subprocess import check_output, check_call, Popen, CalledProcessError, PIPE
@dpryden
dpryden / ClassLoaderLeakExample.java
Created October 20, 2014 00:01
Example of a ClassLoader leak in Java
import java.io.IOException;
import java.net.URLClassLoader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
/**
* Example demonstrating a ClassLoader leak.
*
* <p>To see it in action, copy this file to a temp directory somewhere,
@john2x
john2x / 00_destructuring.md
Last active May 13, 2025 22:05
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences