nowfound

Dev tools · March 16, 2022

PE

Partially encrypt a file based on its HEREDOCs

Hi HN! I wrote a tool that partially encrypts files based on the presence of a HEREDOC. Check it out: https:&#x2F;&#x2F;github.com&#x2F;higgins&#x2F;privatize When added to a git repo, it will automatically transparently encrypt&#x2F;decrypt files you want privatized. For example if you configured your repo to privatize the file `example.txt`, you could write: ``` Today I a burrito. <<PRIVATE I was on the toilet for hours. PRIVATE I got a lot of reading done. ``` but when git-commit'ed would become: ``` Today I a burrito. <<PRIVATE xuJ0fld2vmNWaVLogTIufmWsiFso PRIVATE I got a lot of reading…

In plain words

This tool selectively encrypts portions of files within Git repositories by marking sensitive sections with HEREDOC syntax. When files are committed, only the marked private sections are encrypted while the rest remains visible. Developers can work with unencrypted source files locally, with encryption and decryption happening transparently during Git operations. Only users with the symmetric key can decrypt private sections. It's designed for those maintaining public logs or shared repositories who need to keep certain content private without splitting files.

written from the facts on this page · September 2026

From the sources

In the maker’s words, at launch

Hi HN! I wrote a tool that partially encrypts files based on the presence of a HEREDOC. Check it out: https:&#x2F;&#x2F;github.com&#x2F;higgins&#x2F;privatize When added to a git repo, it will automatically transparently encrypt&#x2F;decrypt files you want privatized. For example if you configured your repo to privatize the file `example.txt`, you could write: ``` Today I a burrito. <<PRIVATE I was on the toilet for hours. PRIVATE I got a lot of reading done. ``` but when git-commit'ed would become: ``` Today I a burrito. <<PRIVATE xuJ0fld2vmNWaVLogTIufmWsiFso PRIVATE I got a lot of reading done. ``` Diffing works as you expect (on the unencrypted source) and only those with the `privatize` symmetric key would be able to unlock and decrypt these files. Why did I do this? I keep a public log of what I plan to accomplish and what I'm working on both personally&#x2F;professionally. At the end of the day, I write a summary of everything that happened. Naturally, there are some details of my life that should be kept private (details of too-be-launched projects, sensitive family events, etc). It's helpful for me to track everything in one file so as to keep the day's context together. Would love to know what you think! Justin

More dev tools this month

the category →
  • Dograh592

    The open source VAPI alternative

    Dev tools · 25d ago · dograh.com

  • Meridian530

    Don't let your work go unnoticed. Get promoted!

    Dev tools · 20d ago · meridiona.com

  • x1516

    Lovable for iPhone apps go from idea to App Store

    Dev tools · 11d ago · x1.new

  • Open-source GTM skills for technical founders

    Dev tools · 29d ago · gtmcofounder.com

  • OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.

    Dev tools · 2d ago · opentrailpaper.com

  • Nuphos380

    The AI-Native DevOps Workspace.

    Dev tools · 24d ago · nuphos.ai

Launched alongside, March 2022

the whole month →
  • IM

    Hi HN! I made many small web games in the past with Unity or Phaser. But this time I wanted to make something completely on my own. So I coded a basic game framework in plain JavaScript, and used it to make Almost Pong. This was a really fun project that taught me a lot about JavaScript, and I plan to make more minimalist games with this framework. Interesting fact: Almost Pong doesn't load any assets, all sprites and sounds are generated with code. Happy to answer questions, and please let me know if you have any feedback on the game. Thanks!

    Dev tools · 2022 · lessmilk.com

  • IM

    Life & fun · 2022 · networksfromscratch.com

  • HA

    Paste the following into the console of any HN page - for annotated avatars on all HN comments. (self contained code) for(u of document.querySelectorAll('.hnuser'))for(u.prepend(c=document.createElement('canvas')),x=c.getContext('2d'),c.width=18,c.height=14,s=u.innerText,r=1,i=28+s.length;i--;i>>29>X*X&#x2F;3+Y&#x2F;2&&x.fillRect(6+2*X,2*Y,2,2)&x.fillRect(6-2*X,2*Y,2,2):r+=s.charCodeAt(i-28,x.fillStyle='#'+(r>>8&0xFFFFFF).toString(16)))r^=r>>17,r^=r>2

    Dev tools · 2022

  • Tome Beta697

    The storytelling tool for work

    Work · 2022 · tome.app

  • Kairn694

    Regain control over your days

    Dev tools · 2022

  • AG

    Life & fun · 2022 · backofyourhand.com