Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>hflabs</title> | |
| <style> | |
| * { margin:0; padding:0; box-sizing:border-box; } | |
| html,body { height:100dvh; overflow:hidden; } | |
| body { | |
| font-family:system-ui,-apple-system,sans-serif; | |
| background:#0a0a0f; | |
| color:#e0e0e0; | |
| display:flex; | |
| align-items:center; | |
| justify-content:center; | |
| padding:clamp(0.5rem,2vh,1.5rem); | |
| } | |
| .container { | |
| max-width:640px; | |
| width:100%; | |
| text-align:center; | |
| display:flex; | |
| flex-direction:column; | |
| align-items:center; | |
| gap:clamp(0.3rem,1vh,0.8rem); | |
| } | |
| .icon { font-size:clamp(1.8rem,7vw,4rem); } | |
| h1 { font-size:clamp(1.5rem,5vw,3rem); } | |
| .actions { | |
| display:flex; | |
| gap:clamp(0.4rem,1vw,0.8rem); | |
| justify-content:center; | |
| flex-wrap:wrap; | |
| } | |
| .btn { | |
| display:inline-flex; | |
| align-items:center; | |
| gap:0.3rem; | |
| background:#1a1a2e; | |
| color:#ccc; | |
| border:1px solid #444; | |
| padding:clamp(0.3rem,1vh,0.5rem) clamp(0.6rem,2vw,1.2rem); | |
| border-radius:8px; | |
| font-size:clamp(0.75rem,2.2vw,0.95rem); | |
| cursor:pointer; | |
| text-decoration:none; | |
| transition:all 0.2s; | |
| } | |
| .btn:hover,.btn.active { background:#2a2a4e; color:#fff; border-color:#777; } | |
| .btn-discuss { border-color:#3a3a6e; background:#1a1a3e; } | |
| .btn-discuss:hover { border-color:#5a5a9e; background:#2a2a5e; } | |
| #content p { | |
| font-size:clamp(0.7rem,2.2vw,0.95rem); | |
| line-height:1.5; | |
| color:#a0a0b0; | |
| margin-bottom:clamp(0.3rem,0.8vh,0.8rem); | |
| } | |
| #content p:last-child { margin-bottom:0; } | |
| .lang-toggle { | |
| display:flex; | |
| gap:0.3rem; | |
| justify-content:center; | |
| } | |
| .lang-toggle button { | |
| background:transparent; | |
| color:#555; | |
| border:none; | |
| padding:0.15rem 0.4rem; | |
| cursor:pointer; | |
| font-size:clamp(0.6rem,1.8vw,0.8rem); | |
| transition:all 0.2s; | |
| } | |
| .lang-toggle button.active { color:#999; text-decoration:underline; text-underline-offset:3px; } | |
| .guide-box { | |
| display:none; | |
| text-align:left; | |
| background:#111; | |
| border:1px solid #333; | |
| border-radius:8px; | |
| padding:clamp(0.4rem,1vh,0.8rem); | |
| font-size:clamp(0.6rem,1.8vw,0.8rem); | |
| color:#aaa; | |
| line-height:1.5; | |
| max-height:45vh; | |
| overflow-y:auto; | |
| width:100%; | |
| } | |
| .guide-box.open { display:block; } | |
| .guide-box pre { | |
| font-size:clamp(0.5rem,1.4vw,0.7rem); | |
| background:#1a1a2e; | |
| padding:0.5rem; | |
| border-radius:4px; | |
| overflow-x:auto; | |
| color:#0f0; | |
| white-space:pre-wrap; | |
| margin:0.3rem 0; | |
| } | |
| .guide-box hr { border-color:#2a2a2a; margin:0.5rem 0; } | |
| .guide-box a { color:#777; } | |
| .footer { font-size:clamp(0.6rem,1.6vw,0.75rem); color:#444; } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <div class="icon">🔬</div> | |
| <h1>hflabs</h1> | |
| <div class="actions"> | |
| <button class="btn" onclick="toggleGuide()">🔧 How to shred commits</button> | |
| <a class="btn btn-discuss" href="https://huggingface.co/spaces/2api/RedTeam/discussions" target="_blank">💬 Discussions</a> | |
| </div> | |
| <div id="guide-box" class="guide-box"> | |
| <p><strong>EN:</strong> Made a mistake and pushed a secret or unwanted file? Here's how to clean your git history. <strong>Warning:</strong> Rewriting history requires a force push and will break forks / PRs.</p> | |
| <pre># 1. Squash recent commits into one | |
| git rebase -i HEAD~N # replace N with number of commits | |
| # In the editor: change "pick" to "squash" (or "s") for all but the first line | |
| # 2. Remove a file from git history entirely | |
| pip install git-filter-repo | |
| git filter-repo --path secrets.txt --invert-paths | |
| # 3. Force push the cleaned history | |
| git push origin main --force</pre> | |
| <p>For detailed docs: <a href="https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository" target="_blank">GitHub guide</a></p> | |
| <hr> | |
| <p><strong>DE:</strong> Ein Secret oder eine ungewollte Datei gepusht? So säuberst du die Git-Historie. <strong>Achtung:</strong> History-Rewriting erfordert einen Force Push und zerstört Forks / PRs.</p> | |
| <pre># 1. Mehrere Commits zu einem zusammenschieben | |
| git rebase -i HEAD~N # N durch Anzahl Commits ersetzen | |
| # Im Editor: "pick" durch "squash" (oder "s") ersetzen, außer in der ersten Zeile | |
| # 2. Datei komplett aus der History löschen | |
| pip install git-filter-repo | |
| git filter-repo --path secrets.txt --invert-paths | |
| # 3. Bereinigte History force-pushen | |
| git push origin main --force</pre> | |
| <p>Detaillierte Doku: <a href="https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository" target="_blank">GitHub Leitfaden</a></p> | |
| </div> | |
| <div id="content"></div> | |
| <div class="lang-toggle"> | |
| <button class="active" onclick="switchLang('en')">English</button> | |
| <button onclick="switchLang('de')">German</button> | |
| </div> | |
| </div> | |
| <script> | |
| var TEXTS={en:["A small experimental space for testing Hugging Face tools, APIs, and integrations. We build prototypes, run benchmarks, and explore what's possible on the Hub.","If you received a notification from us \u2014 don't worry, it's not spam. We occasionally run automated cleanup scans across public repos and reach out if something catches our eye. Drop a comment in the discussions so we know you've seen it, and leave a follow if you'd like to stay in the loop. Happy to answer any questions.","We're using Discussions because Hugging Face doesn't offer direct chat \u2014 it's the only way we can reach you privately. If you have questions or concerns, just reply to the discussion and we'll get back to you.","This is a personal sandbox project. Nothing here is production-ready \u2014 just experiments and proof-of-concepts."],de:["Ein kleines experimentelles Space zum Testen von Hugging Face Tools, APIs und Integrationen. Wir bauen Prototypen, f\u00fchren Benchmarks durch und erkunden was auf dem Hub m\u00f6glich ist.","Falls du eine Benachrichtigung von uns bekommen hast \u2014 keine Sorge, das ist kein Spam. Wir lassen ab und zu automatisierte Aufr\u00e4um-Scans \u00fcber \u00f6ffentliche Repos laufen und melden uns wenn uns etwas auff\u00e4llt. Hinterlass gern einen Kommentar in den Discussions damit wir wissen dass du es gesehen hast, und folge dem Space wenn du auf dem Laufenden bleiben willst. Bei Fragen sind wir f\u00fcr dich da.","Wir nutzen Discussions weil Hugging Face keinen direkten Chat anbietet \u2014 das ist der einzige Weg wie wir dich privat erreichen k\u00f6nnen. Bei Fragen oder Anliegen antworte einfach auf die Discussion und wir melden uns bei dir.","Dies ist ein pers\u00f6nliches Sandbox-Projekt. Nichts hier ist produktionsreif \u2014 nur Experimente und Proof-of-Concepts."]}; | |
| function render(l){document.getElementById('content').innerHTML=TEXTS[l].map(function(p){return'<p>'+p+'</p>'}).join('');document.querySelectorAll('.lang-toggle button').forEach(function(b){b.classList.remove('active')});document.querySelector('.lang-toggle button[onclick*="'+l+'"]').classList.add('active')} | |
| render('en');function switchLang(l){render(l)} | |
| function toggleGuide(){document.getElementById('guide-box').classList.toggle('open')} | |
| </script> | |
| </body> | |
| </html> | |