Skip to content

Instantly share code, notes, and snippets.

@JaosnHsieh
Last active May 16, 2023 04:58
Show Gist options
  • Save JaosnHsieh/c4467f51f94d0e9148481f22ea2c45e8 to your computer and use it in GitHub Desktop.
Save JaosnHsieh/c4467f51f94d0e9148481f22ea2c45e8 to your computer and use it in GitHub Desktop.

Revisions

  1. JaosnHsieh revised this gist May 16, 2023. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion print.md
    Original file line number Diff line number Diff line change
    @@ -43,4 +43,9 @@ xxx
    ```


    2. based on the previous context, if I would like to add a new feature that "xxxxxx", what files would I have to modify, what functions would be involoed, how can I add this feature?`
    2. how to add a new feature?

    ```
    based on the previous context, if I would like to add a new feature that "xxxxxx", what files would I have to modify, what functions would be involoed, how can I add this feature?`
    ```
  2. JaosnHsieh renamed this gist May 16, 2023. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. JaosnHsieh created this gist May 16, 2023.
    46 changes: 46 additions & 0 deletions print.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,46 @@
    ## claude-instant-100k

    poe.com added a bot that can consume `75,000` words, that can read the code or papers and give suggestions based on it. It's amazing.
    ## print.sh for typescript projects
    Code was generated by GPT-4
    Save it to `print.sh` and make it executable `chmod +x ./print.sh`
    `$ ./print.sh > all-code` would save all `*.ts` and *.tsx` to the `all-code` file
    print.sh
    ```sh
    #!/bin/bash
    # Print the tree for .ts and .tsx files using the tree command, excluding .d.ts files and the node_modules directory
    tree -I '*.d.ts|node_modules' -P '*.ts' -P '*.tsx' ./
    # Print the content of each .ts and .tsx file with the file path, excluding .d.ts files and the node_modules directory
    find ./ -type d -name 'node_modules' -prune -o \( -name "*.ts" -o -name "*.tsx" \) ! -name "*.d.ts" -print | while read -r file; do
    echo
    echo "$file"
    echo
    echo "\`\`\`"
    cat "$file"
    echo "\`\`\`"
    done
    ```
    ## Some prompts I used on for asking the proejct
    1. summarize
    ```
    summarize the following software code
    xxx
    ```
    2. based on the previous context, if I would like to add a new feature that "xxxxxx", what files would I have to modify, what functions would be involoed, how can I add this feature?`