Skip to content

Instantly share code, notes, and snippets.

View derekbar90's full-sized avatar
🚀

Derek Barrera derekbar90

🚀
View GitHub Profile
@ntamvl
ntamvl / Increasing-the-amount-of-inotify-watchers.md
Created August 16, 2017 03:10
Increasing the amount of inotify watchers

Increasing the amount of inotify watchers

If you are not interested in the technical details and only want to get Listen to work:

  • If you are running Debian, RedHat, or another similar Linux distribution, run the following in a terminal:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
@icebob
icebob / README.md
Last active October 22, 2023 19:50
Health-check middleware for Moleculer (for Kubernetes liveness readiness checks)
import * as React from 'react';
import PropTypes from 'prop-types';
type Props = {
disabled?: boolean;
children: React.ReactNode;
};
export class WindowScrollContext extends React.Component<Props> {
// https://github.com/necolas/react-native-web/blob/master/packages/react-native-web/src/vendor/react-native/VirtualizedList/index.js#L470
@HighSoftWare96
HighSoftWare96 / moleculer-broker-call-mocker.js
Last active February 12, 2021 01:35
Moleculer.services mock services helper function. With this function you can mock services by mocking broker.call and returning the desired result for a service that you don't wan't to test right now.
function mockBrokerCall(broker, serviceInstance, callSignature, implementationFn) {
if (serviceInstance.broker.call.mockRestore) {
serviceInstance.broker.call.mockRestore();
}
const originalImplementation = serviceInstance.broker.call;
// reimplemento la broker.call per verificare se viene chiamata con il servizio
// da mockare e ritornare l'implementazione passata