Skip to content

Instantly share code, notes, and snippets.

View sainikhileshreddy's full-sized avatar
:octocat:
Best Ninja Alive!

Sai Nikhilesh Reddy sainikhileshreddy

:octocat:
Best Ninja Alive!
View GitHub Profile
@sainikhileshreddy
sainikhileshreddy / (3D)Construct_the_de_Bruijn_Graph_of_a_String.ipynb
Created September 13, 2020 15:13
[3D] Construct the de Bruijn Graph of a String
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sainikhileshreddy
sainikhileshreddy / .pre-commit-config.yaml
Last active April 18, 2023 08:00
Pre-commit Configuration File for Python and Notebook based projects
exclude: '^docs/conf.py'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
- id: check-ast
- id: check-json
@sainikhileshreddy
sainikhileshreddy / README.md
Last active September 24, 2023 07:58
Google Photos Takeout - iCloud Photos - Image Metadata Transfer - JSON Metadata to JPG - EXIF(tool)

Follow the steps to transfer the JSON metadata to JPG/MP4

  1. First move all the uncompressed files you have downloaded to a common folder

    $ rsync -av --ignore-existing source_folder/ destination_folder/
  2. Download the source code of exiftool or git clone it

@sainikhileshreddy
sainikhileshreddy / .bashrc
Last active March 28, 2024 04:24
Linux CLI Setup
# bash theme - partly inspired by https://github.com/ohmyzsh/ohmyzsh/blob/master/themes/robbyrussell.zsh-theme
# add these lines in ~/.bashrc (before the conda base initialization)
__bash_prompt() {
local userpart='`export XIT=$? \
&& [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[1;32m\]@${GITHUB_USER} " || echo -n "\[\033[1;32m\]\u " \
&& [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`'
local gitbranch='`\
if [ "$(git config --get devcontainers-theme.hide-status 2>/dev/null)" != 1 ] && [ "$(git config --get codespaces-theme.hide-status 2>/dev/null)" != 1 ]; then \
export BRANCH=$(git --no-optional-locks symbolic-ref --short HEAD 2>/dev/null || git --no-optional-locks rev-parse --short HEAD 2>/dev/null); \
if [ "${BRANCH}" != "" ]; then \
@sainikhileshreddy
sainikhileshreddy / cursor_rules_for_ai.txt
Created November 5, 2024 06:59
Cursor - Rules for AI
DO NOT GIVE ME HIGH LEVEL SHIT, IF I ASK FOR FIX OR EXPLANATION, I WANT ACTUAL CODE OR EXPLANATION!!! I DON'T WANT "Here's how you can blablabla"
- Be casual unless otherwise specified
- Be terse
- Suggest solutions that I didn't think about—anticipate my needs
- Treat me as an expert
- Be accurate and thorough
- Give the answer immediately. Provide detailed explanations and restate my query in your own words if necessary after giving the answer
- Value good arguments over authorities, the source is irrelevant
- Consider new technologies and contrarian ideas, not just the conventional wisdom
@sainikhileshreddy
sainikhileshreddy / icloud_account_removal.md
Created June 26, 2026 14:44
Remove icloud apple account from macbook - backup the data first before procedding.

Yes, it is generally safe when used for this specific purpose (clearing stuck iCloud/MobileMe account data), but with important caveats. This is a well-documented community workaround that has helped many users resolve sign-out or Find My issues on macOS. It deletes legacy MobileMe (pre-iCloud) account preferences/plist files that can cause glitches in modern iCloud sign-in/out flows.

Important Warnings Before Proceeding

  • Backup first: Use Time Machine or manually back up critical data. While low-risk, Terminal commands can have side effects.
  • It primarily forces a sign-out/reset of iCloud account data on the local Mac. Your data in iCloud remains safe on Apple's servers.
  • It may require you to re-enter your Apple ID password and re-enable services afterward.
  • Not guaranteed to disable Find My directly (Find My is tied to Activation Lock). If Find My remains stuck after this, combine it with the previous suggestions (iCloud.com remote removal or Apple Support).
  • Works best on admin a
{
"global": { "check_for_updates_on_startup": false },
"profiles": [
{
"complex_modifications": {
"rules": [
{
"description": "Caps Lock → Hyper Key (⌃⌥⇧⌘) | Escape if alone | Use fn + caps lock to enable caps lock",
"manipulators": [
{