Skip to content

Instantly share code, notes, and snippets.

View asantos2000's full-sized avatar
🏠
Working from home

Anderson Santos asantos2000

🏠
Working from home
View GitHub Profile
@asantos2000
asantos2000 / README.md
Created January 21, 2024 23:13 — forked from 4wk-/README.md
Clean uninstall then reinstall of WSL on Windows 10, with systemD support

Uninstall then reinstall WSL on Windows 10 (clean way)

Background

I've been using wsl (version 2) with genie mod for years without issue, but one day, Windows 10 finally catch up on wsl Windows 11 features and gives us a way to use systemD natively.

I wanted to use the new "right way" to enable systemD on Windows Subsystem for Linux (without genie), and I also had a (probably related) infinite Windows RemoteApp error poping in.

Fixing it

A - Uninstall wsl and related stuff

  1. In powershell (as admin)
@asantos2000
asantos2000 / astar.py
Created April 21, 2022 00:53 — forked from Nicholas-Swift/astar.py
A* pathfinding algorithm. Please see comments below for a fork of this gist that includes bug fixes!
class Node():
"""A node class for A* Pathfinding"""
def __init__(self, parent=None, position=None):
self.parent = parent
self.position = position
self.g = 0
self.h = 0
@asantos2000
asantos2000 / install_Jupyter.sh
Last active October 10, 2020 20:16 — forked from gatopeich/install_Jupyter.sh
Install Jupyter iPython Notebook on Android via Termux
# Install jupyter notebook on termux android
pkg upgrade
# Install runtime deps
pkg install python libzmq libcrypt
pip install jupyter
@asantos2000
asantos2000 / MANIFEST.in
Created November 14, 2019 18:59 — forked from jpmens/MANIFEST.in
Including git version in setup.py files. (Requires at least _one_ tag in the repo) Normally used to make things like, "python setup.py sdist" give you a predictable name for files. Normally used with tags on the repo like 0.1 or 2.3.0 You should add RELEASE-VERSION to MANIFEST.in so that end users of the tarball can use this too.
include RELEASE-VERSION
include version.py
# Anything else you normally use
@asantos2000
asantos2000 / 32.asm
Created June 26, 2019 14:50 — forked from FiloSottile/32.asm
NASM Hello World for x86 and x86_64 Intel Mac OS X (get yourself an updated nasm with brew)
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32
global start
section .text
start:
push dword msg.len
push dword msg
push dword 1
mov eax, 4
@asantos2000
asantos2000 / generate-ssh-key.sh
Created November 14, 2018 16:31 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa
@asantos2000
asantos2000 / sshKeyGen.py
Created October 27, 2018 21:31 — forked from oliv2915/sshKeyGen.py
Python script that uses ssh-keygen and ssh-copy-id to create SSH keys
'''
Author: Brian Oliver II
Instagram: bolo_ne3
License:
MIT License
Copyright (c) 2016 Brian Oliver II
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

Supported built-in functions

  • abs(float) - Returns the absolute value of a given float. Example: abs(1) returns 1, and abs(-1) would also return 1, whereas abs(-3.14) would return 3.14. See also the signum function.

  • basename(path) - Returns the last element of a path.

  • base64decode(string) - Given a base64-encoded string, decodes it and returns the original string.

@asantos2000
asantos2000 / .gitignore
Created October 11, 2018 18:02 — forked from olooney/.gitignore
worked examples of argparse and python logging
logs/
@asantos2000
asantos2000 / LC_TYPE.txt
Created October 11, 2018 13:07 — forked from felipekm/LC_TYPE.txt
Linux warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
vi /etc/environment
# add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8