Skip to content

Instantly share code, notes, and snippets.

View memoriasIT's full-sized avatar
:octocat:
Probably coding...

Memorias de un informático (Lorenzo) memoriasIT

:octocat:
Probably coding...
View GitHub Profile
@shakna-israel
shakna-israel / Prose.md
Last active November 15, 2023 22:06
Obfuscating Python

Obfuscating Python

Obfuscation isn't difficult in most programming languages. It's why we have "good practices" because it is so easy to hide what you mean in badly written code.

Obfuscation tends to be even easier in dynamic languages because of how forgiving they tend to be - and because they tend to give you direct access to the environment so that you can manipulate it.

Today, for fun, I'm going to obfuscate this code:

def _(n):

if n <= 0:

@mireq
mireq / userChrome.css
Last active October 19, 2023 11:59
Compact responsive oneliner for Firefox
*|*:root:not([customizing]) {
--new-tab-height: 29px;
}
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
*|*:root:not([customizing]) .tabbrowser-tab {
min-height: var(--new-tab-height) !important;
}
@SamL98
SamL98 / get_recents.py
Last active March 9, 2024 01:54
Python Script for Getting Spotify Listening History
# To run as a local cron job, edit your crontab like so:
#
# SPOTIPY_USER_ID=<redacted>
# SPOTIPY_CLIENT_ID=<redacted>
# SPOTIPY_CLIENT_SECRET=<redacted>
# script_path=<redacted>
# SPPATH=$script_path
# python_path=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3
#
# PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
@jvalrog
jvalrog / pamute
Last active August 21, 2022 11:55
Mute/Unmute individual Pulseaudio's streams using Rofi
#!/bin/bash
#########################################################
#
# PAMUTE
#
# Mute/Unmute individual Pulseaudio's streams using Rofi.
#
# Requires:
# - pactl
@aras-p
aras-p / preprocessor_fun.h
Last active April 12, 2024 17:24
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@ssstonebraker
ssstonebraker / sed cheatsheet
Created August 2, 2013 14:06 — forked from un33k/sed cheatsheet
Sed Cheatsheet
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'