Create various settings file I have one file for each provider, all in ~/.claude
- KIMI K2.5: kimi_settings.json
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.moonshot.ai/anthropic",
| # Sample Nginx config with sane caching settings for modern web development | |
| # | |
| # Motivation: | |
| # Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools. | |
| # These tools automatically deactivate all sorts of caching for you, so you always have a fresh | |
| # and juicy version of your assets available. | |
| # At some point, however, you want to show your work to testers, your boss or your client. | |
| # After you implemented and deployed their feedback, they reload the testing page – and report | |
| # the exact same issues as before! What happened? Of course, they did not have developer tools | |
| # open, and of course, they did not empty their caches before navigating to your site. |
TLDR: JWTs should not be used for keeping your user logged in. They are not designed for this purpose, they are not secure, and there is a much better tool which is designed for it: regular cookie sessions.
If you've got a bit of time to watch a presentation on it, I highly recommend this talk: https://www.youtube.com/watch?v=pYeekwv3vC4 (Note that other topics are largely skimmed over, such as CSRF protection. You should learn about other topics from other sources. Also note that "valid" usecases for JWTs at the end of the video can also be easily handled by other, better, and more secure tools. Specifically, PASETO.)
A related topic: Don't use localStorage (or sessionStorage) for authentication credentials, including JWT tokens: https://www.rdegges.com/2018/please-stop-using-local-storage/
The reason to avoid JWTs comes down to a couple different points:
Picking the right architecture = Picking the right battles + Managing trade-offs
| RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
| RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
| npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache | |
| Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache |
| // =================== Scope ======================= // | |
| for (var i = 1; i < 5; i++) { | |
| setTimeout(function() { | |
| console.log(i); | |
| }, i * 1000); | |
| } | |
| for (var i = 1; i < 5; i++) { | |
| (function(j) { |
| // http://www.slideshare.net/nzakas/scalable-javascript-application-architecture | |
| // http://addyosmani.com/largescalejavascript/ | |
| // http://boilerplatejs.org/ | |
| // http://rmurphey.com/blog/2009/10/15/using-objects-to-organize-your-code/ | |
| // http://stackoverflow.com/questions/11842923/organizing-javascript-code | |
| // http://stackoverflow.com/questions/247209/current-commonly-accepted-best-practices-around-code-organization-in-javascript | |
| // http://msdn.microsoft.com/en-us/magazine/gg602402.aspx | |
| // https://coderwall.com/p/b5jutw | |
| // http://alexsexton.com/blog/2010/02/using-inheritance-patterns-to-organize-large-jquery-applications/ |
| /* | |
| Simple WINDOWS keylogger by jkrix 2013. | |
| User may distribute and modify source code but MUST keep this top commented section in the source code! | |
| Very important note: | |
| To be used for educational use and not for malicious tasks! | |
| I will NOT be held responsible for anything silly you may do with this! | |
| */ | |
| #include <stdio.h> |