Находки в опенсорсе
10.6K subscribers
11 photos
1 video
3 files
816 links
Привет!

Меня зовут Никита Соболев. Я занимаюсь опенсорс разработкой полный рабочий день.

Тут я рассказываю про #python, #c, опенсорс и тд.
Поддержать: https://boosty.to/sobolevn
РКН: https://vk.cc/cOzn36

Связь: @sobolev_nikita
Download Telegram
fs-err is a drop-in replacement for #rust std::fs that provides more helpful messages on errors. Extra information includes which operations was attmpted and any involved paths.

The error message that Rust gives you isn't very useful: The system cannot find the file specified. (os error 2)

...but if we use fs-err instead, our error contains more actionable information:

 to open file `does not exist.txt`
caused by: The system cannot find the file specified. (os error 2)


https://github.com/andrewhickman/fs-err
​​Linkalot is a web-based inbox for your links.

Linkalot’s highlights:

- Instantly save links in a link list using the accompanying bookmarklet.
- Add a short description to a link. The description appears as a pop-up on hover.
- All links are saved in a plain text file.
- Password-protected editing area for managing the saved links.

Repo: https://gitlab.com/dmpop/linkalot
Demo: https://tokyoma.de/linkalot/

#php
​​Design tokens at your fingertips.

Classy-UI is CSS properties abstracted to design tokens. This abstraction does not only make your design consistent, but also discoverable and documented at your fingertips in the IDE.

Features:

- No runtime in production
- The application starts without a single line of CSS. Based on the API usage Classy-UI will automatically generate the CSS they represent
- Add decorators (pseudo selectors and media queries) directly on your tokens, and again Classy-UI will automatically build the necessary CSS
- Classy-UI completely gets rid of specificity issues
- When you write tokens you can search them right in the code. You also get documentation of what CSS the token produces, even without Typescript
- An excellent developer experience as your IDE writes the tokens for you, you just select them from the intellisense
- If you use invalid tokens Classy-UI will yell at you
- When adding themes that overrides tokens, they automatically become CSS variables
- In production Classy-UI will shorten all the CSS classnames, group media queries and themes, creating a highly optimized bundle

https://classy-ui.io/

#js #css #html
Useful example about #ddd for #haskell

It explains some of the philosophies behind using ValidateT, persistent & polysemy as the impl artifacts of various DDD principles in a purely functional setting.
​​> It has been over 4 years since I last wrote #csharp, and being exposed to functional programming clearly affected how I write code today. The snippet I wrote seems very neat and natural, however, some people expressed concerns that it doesn’t feel like C# code — “It looks too functional.“

Great article about writing simple and readable code in any language.
​​MixAudit provides a mix deps.audit task to scan a project Mix dependencies for known #elixir security vulnerabilities.

https://github.com/mirego/mix_audit
> Almost every week I accidentally get into this logging argument. Here’s the problem: people tend to log different things and call it a best-practice. And I am not sure why. When I start discussing this with other people I always end up repeating the exact same ideas over and over again.

> So. Today I want to criticize the whole logging culture and provide a bunch of alternatives.

#rant #devops
> There’s a little-known pattern in software architecture that deserves more attention: data-oriented architecture.

> DOA is an inversion of the traditional dichotomy between a monolithic binary and data store (monolithic architecture) on the one hand, and small, distributed, independent binaries each with their own data stores (microservices, and service-oriented architecture) on the other.

> In data-oriented architecture, a monolithic data store is the sole source of state in the system, which is being acted on by loosely-coupled, stateless microservices.

#architecture
​​> Clear Your Terminal in Style
> If you’re someone like me who habitually clears their terminal, sometimes you want a little excitement in your life. Here is a way to do just that.

Here's the example from Matrix. There are many more inside!

#cli
​​Daat is an experimental library meant to provide parameterized modules to #elixir.

Imagine that you have a module named UserService, that exposes a function named follow/2. When called, the system sends an email to the user being followed. It would be nice if we could extract actually sending the email from this module, so that we aren't coupling ourselves to a specific email client, and so that we can inject mocks into the service for testing purposes.

By using parameterized, or higher-order modules, we can instead define a module that specifies an interface, and acts as a generator for modules of that interface. By then passing our dependencies to this generator, we are able to dynamically create new modules that implement our desired behaviour.

https://github.com/QuinnWilton/daat
​​SHML is a #shell framework for faster and easier script development. HTML has CSS, terminals have "ANSI/VT100 Control Sequences". SHML makes is easy to apply some style to your shell scripts without trying to remember that Yellow = \033[33m instead Yellow is $(color yellow).

https://github.com/odb/shml
​​Find open-source alternatives for your favorite apps.

https://opensource.builders/
​​Enforceable standards for your package.json scripts – like eslint for npm run!

package.json scripts are an integral part of the Node dev experience: we use them to start our projects, run our dev environments and for all kinds of formatting, linting and tooling in general. They are just as important as our code. Yet we don't treat them with the same meticulous attention to detail. Scripts need ❤️ too!

One of the main goals for scriptlint was to enable people to use memorable and consistent script names across their projects. Tools like nps are great when you have to organize scripts with a certain level of complexity, but they don't help you with the structure and naming of your scripts.

This is where the scriptlint CLI shines: it makes best practices outlined in this documentation enforceable throughout your project(s). Think of it as eslint for your "scripts" section.

https://github.com/peerigon/scriptlint

#ts #js
​​Bringing full-stack to the JAMstack

Do you love the JAMstack philosophy but need a database-backed web app? Want great developer experience and easy scaling? Redwood is here! Built on #react, GraphQL, and Prisma, Redwood works with the components and development workflow you love, but with simple conventions and helpers to make your experience even better.

https://redwoodjs.com/

It also includes React Single File components: https://www.swyx.io/writing/react-sfcs-here/

#ts #js
​​Breaking news!

#npm is joining #github!

npm is a critical part of the #js world. The work of the npm team over the last 10 years, and the contributions of hundreds of thousands of open source developers and maintainers, have made npm home to over 1.3 million packages with 75 billion downloads a month. Together, they’ve helped JavaScript become the largest developer ecosystem in the world. We at GitHub are honored to be part of the next chapter of npm’s story and to help npm continue to scale to meet the needs of the fast-growing JavaScript community.

Looking further ahead, we’ll integrate GitHub and npm to improve the security of the open source software supply chain, and enable you to trace a change from a GitHub pull request to the npm package version that fixed it. Open source security is an important global issue, and with the recent launch of the GitHub Security Lab and GitHub’s built-in security advisories, we are well-positioned to make a difference. In addition, GitHub Sponsors has already paid out millions of dollars to open source contributors, and we’re excited to explore tasteful ways to extend it to the npm ecosystem.

https://github.blog/2020-03-16-npm-is-joining-github/
​​#python

django-schema-graph makes a colourful diagram out of your Django models. The diagram is interactive, and makes it easy to toggle models and apps on/off at will.

https://github.com/meshy/django-schema-graph

It looks like this:
​​Health checks for your documentation links.

Features:
- Concurrent and recursive checks
- Respect robots.txt restrictions (content only)
- External links checks
- Checking links within base url path
- Retries in the case of 502, 503 and 504 http errors

https://github.com/butuzov/deadlinks

#python
​​Introducing wax: a #wasm package runner!

wax is a tool intended to ease the use of command-line WebAssembly applications on your system. Similarly to wapm, that allows the installation and usage of packages and commands, wax enables use of CLI tools without installing them globally or changing your PATH.

https://wasmer.io/
Lightweight Kubernetes. Easy to install, half the memory, all in a binary less than 40mb.

Great for:
- Edge
- IoT
- CI
- ARM
- Situations where a PhD in #k8s clusterology is infeasible

https://github.com/rancher/k3s

#go #devops
​​Lens - The free, smart desktop application for managing Kubernetes clusters.

What makes Lens special?
- Amazing usability and end user experience
- Real-time cluster state visualization
- Resource utilization charts and trends with history powered by built-in Prometheus
- Terminal access to nodes and containers
- Fully featured role based access control management
- Dashboard access and functionality limited by RBAC

https://github.com/lensapp/lens

#k8s #ts
​​papermill is a tool for parameterizing, executing, and analyzing Jupyter Notebooks.

Papermill lets you:

- parameterize notebooks
- execute notebooks

This opens up new opportunities for how notebooks can be used. For example:

- Perhaps you have a financial report that you wish to run with different values on the first or last day of a month or at the beginning or end of the year, using parameters makes this task easier.
- Do you want to run a notebook and depending on its results, choose a particular notebook to run next? You can now programmatically execute a workflow without having to copy and paste from notebook to notebook manually.

https://github.com/nteract/papermill

#python

That's how you execute notebooks: papermill local/input.ipynb s3://bkt/output.ipynb -p alpha 0.6 -p l1_ratio 0.1

And that's how you parametrize them: