Skip to content

Instantly share code, notes, and snippets.

View xidsyed's full-sized avatar
💭
¯\_(ツ)_/¯

Syed xidsyed

💭
¯\_(ツ)_/¯
View GitHub Profile

Outline

Java Code 
 → javac 
 → Java Bytecode 
 → JVM (C++) 
     → Interpreter + JIT (HotSpot)
     → Machine Code
@xidsyed
xidsyed / README.md
Last active April 30, 2023 09:29
Shallow Copy Pages Linked in Markdown Obsidian

Usage:

Place this script anywhere and run it from the terminal by passing 3 arguments file_path source_dir and target_dir like so

python copy_md_files.py "path/to/your/source_md_file.md" "path/to/your/source_directory" "path/to/your/target_directory"

Additional Behaviour

  • If the target directory does not exist it will create a new one if it can
  • Some links might be empty, the script will printout the path of every file that was on the obsidian page but does not exist in the directory
@xidsyed
xidsyed / README.md
Last active April 26, 2023 20:05
GPT 4 Generated Light Nord Theme for Chroma

I asked GPT4 to create a light nord color palette for me, based on dark version.

  • I seriosly doubted it could do it. As intelligent as it is, playing with hexcodes, doesnt seem like a very easy task, without any additional tools, on top of that, it had to maintain 306 lines of code in it's context, and copy it all line for line, without making a single error, only swapping out lighter hex values for darkers ones as deemed necessary
  • Fully expecting it to crap itself after the 30th line or so, i decided to help it out a little and offered it 4 replacement 'darker' colors in exchange for the lighter ones

You can view my complete discussion with GPT4 , where i later on ask it to generate a completely new color palette, based on color descriptions, ask it to modify the hexes to incorporate different tones, and even asked it to walk me through the process. It derps a little at the very end, but when prompted with 'ca

@xidsyed
xidsyed / app.js
Last active August 7, 2020 22:15
// Get path to public directory
const publicDirPath = path.join(__dirname, '../public');
// add static dir to serve, to middleware stack
app.use(express.static(publicDirPath));
// Send File in response
res.sendFile(path.resolve(publicDirPath, 'static.html'));