Skip to content

Instantly share code, notes, and snippets.

View ak9999's full-sized avatar
🎯
Focusing

Abdullah "AJ" Khan ak9999

🎯
Focusing
  • New York
View GitHub Profile
@lukaskonarovsky
lukaskonarovsky / dynamicarray.cpp
Created April 6, 2009 21:33
C++ dynamic array implementation
#include "dynamicarray.h"
using namespace std;
DynamicArray::DynamicArray() {
DynamicArray::DynamicArray(5);
}
DynamicArray::DynamicArray(int initSize) {
size = initSize;
import sys, marshal, functools, subprocess
child_script = """
import marshal, sys, types;
fn, args, kwargs = marshal.load(sys.stdin)
marshal.dump(
types.FunctionType(fn, globals())(*args, **kwargs),
sys.stdout)
"""
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active May 22, 2024 20:25 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@steven2358
steven2358 / ffmpeg.md
Last active May 10, 2024 20:57
FFmpeg cheat sheet
@lizthegrey
lizthegrey / attributes.rb
Last active February 24, 2024 14:11
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@tiran
tiran / python-on-debian.md
Last active May 21, 2024 08:46
Negative Python user experience on Debian/Ubuntu

Negative Python user experience on Debian/Ubuntu

The user experience of Python on a minimal Debian or Ubuntu installation is bad. Core features like virtual environments, pip bootstrapping, and the ssl module are either missing or do not work like designed and documented. Some Python core developers including me are worried and consider Debian/Ubuntu's packaging harmful for Python's reputation and branding. Users don't get what they expect.

Reproducer

The problems can be easily reproduced with official Debian and Ubuntu containers in Docker or Podman. Debian Stable (Debian 10 Buster) comes with Python 3.7.3. Ubuntu Focal (20.04 LTS) has Python 3.8.5.

Run Debian container

@AbstractUmbra
AbstractUmbra / 00-deprecation.md
Last active May 2, 2024 02:34
discord.py 2.0+ slash command info and examples

This gist has now been 'deprecated' and has moved...

... to my blog style space for easier contribution by third parties and to provide what I believe to be an easier reading experience. Please field all enquiries and issues to the source repository.