Skip to content

Instantly share code, notes, and snippets.


Ionel Cristian Mărieș ionelmc

Block or report user

Report or block ionelmc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
"""Example usage:
In [1]: !cat ayy.s
.global _start
.type _start, @function
movq $10, %rdx
pushw $10
manojpandey /
Last active Oct 6, 2018
Attack of Pythons

Attack of Pythons

Among computer programmers, a “gotcha” has become a term for a feature of a programming language that is likely to play tricks on you to display behavior that is different than what you expect.

Just as a fly or a mosquito can “bite” you, we say that a gotcha can “bite” you. So, let's proceed to examine some of Python's gotchas !

alt text

alirobe / reclaimWindows10.ps1
Last active Dec 3, 2019
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of (different defaults). N.…
View reclaimWindows10.ps1
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <>
# Modified by: alirobe <> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source:
# Tweaked Source:
# Tweak difference:
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
#!/usr/bin/env python
# -*- coding: utf-8 -*-
Build a pip-compatible sdist for the flit package in the current directory.
import flit, zipfile, os.path
def build_sdist():
# build wheel
Last active Jul 4, 2019
Persistent pipes/circular buffers for Linux

📂 Persistent "pipes" in Linux

In a project I'm working on I ran into the requirement of having some sort of persistent FIFO buffer or pipe in Linux, i.e. something file-like that could accept writes from a process and persist it to disk until a second process reads (and acknowledges) it. The persistence should be both across process restarts as well as OS restarts.

AFAICT unfortunately in the Linux world such a primitive does not exist (named pipes/FIFOs do not persist

View bling.js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
NodeList.prototype.__proto__ = Array.prototype;
chernjie /
Created Feb 9, 2015
Fetch Github's Pull Request as a remote branch
#!/usr/bin/env bash
git remote -v | grep fetch | grep github | \
while read remote url _; do
if ! git config --get-all "remote.$remote.fetch" | grep -q refs/pull
git config --add "remote.$remote.fetch" \
markshannon /
Created Nov 30, 2014
Dynamic attribute module
import sys
import warnings
from types import ModuleType
from importlib import import_module
except NameError:
basestring = str
dutc / Makefile
Last active Aug 29, 2015
function hooking in C
View Makefile
.PHONY: hook
CC=gcc -std=c99 -Wall
hook: hook-main
LD_PRELOAD=./ ./hook-main
hook-main: hook-main.c
${CC} -O0 -Wl,--export-dynamic -g -ggdb -o $@ $^ -ldl
import inspect
class n_partialable(object):
def arity_evaluation_checker(function):
is_class = inspect.isclass(function)
if is_class:
function = function.__init__
You can’t perform that action at this time.