https://nicolas-py.github.io/portfolio-m/
Portfolio data is fetched from the centralized API:
https://nicolas-py.github.io/portfolio-provider/api/portfolio.json
This project uses OpenAPI types for type-safe API access. To regenerate types from the OpenAPI schema:
npm run generate-types# Install dependencies
npm install
# Build TypeScript
npm run build
# Watch mode for development
npm run devTo run the website locally, use Python's built-in HTTP server:
python3 -m http.server 8000Then open your browser and navigate to http://localhost:8000
- structure
- style
- js
- content
- yml
def word_to_hex(word):
# Choose a constant key for XOR (can be any byte value, 0xAA here for example)
key = 0xAA
# Convert each character to its ASCII value, apply XOR, and store the result
xor_values = [ord(char) ^ key for char in word]
# Combine the XORed values into a hex string
hex_string = ''.join(f'{value:02X}' for value in xor_values)
# Truncate or pad the hex string to ensure it's 8 digits
if len(hex_string) > 8:
hex_string = hex_string[:8] # Truncate if too long
else:
hex_string = hex_string.ljust(8, '0') # Pad with zeroes if too short
return hex_string
# Example usage
word = "Hello"
hex_code = word_to_hex(word)
print(f"The 8-digit hex code for '{word}' is: {hex_code}")