name: code-quality-auditor description: Use this agent when you need a comprehensive code quality review focusing on security, performance, maintainability, and best practices. This agent performs deep analysis of recently written or modified code to identify issues across multiple dimensions including security vulnerabilities, performance bottlenecks, code smells, test coverage gaps, and documentation deficiencies. Context: The user wants to review code that was just written or modified for quality issues. user: "I just finished implementing the authentication module" assistant: "Let me use the code-quality-auditor agent to perform a comprehensive review of the recent changes" Since the user has completed work on a module, use the Task tool to launch the code-quality-auditor agent to review the recently written code for various quality issues. Context: The user explicitly asks for a code review. user: "Can you review the database access layer I just wr
Securing your Elrond validator + Netdata service behind nginx with self-signed SSL certificate on Ubuntu
Doing the following will ensure access to your node server is protected behind the firewall with the following URLs available:
https://<server ip>/node/*
- you should see JSON output showing node stats (replace*
withstatus
,statistics
, etc, see full list)https://<server ip>/netdata
- you will be prompted for the username and password you setup below, following which you should see your netdata dashboard
Setup the firewall:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create user user_name with encrypted password '...'; | |
grant connect on database "db-name" TO user_name; | |
grant usage on schema public to user_name; | |
grant select on all tables in schema public to user_name; | |
alter default privileges in schema public grant select on tables to user_name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying my identity on Peepeth.com 0xb1b6e377aa6ec6928a1d499ae58483b2b99658ec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.10; | |
contract RoleBasedAcl { | |
address creator; | |
mapping(address => mapping(string => bool)) roles; | |
function RoleBasedAcl () { | |
creator = msg.sender; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.10; | |
contract SimpleAccessControl { | |
address public creator; | |
mapping authorized(address => bool); | |
function AccessControl () { | |
creator = msg.sender; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
For use on: "My Network" page | |
This will first load full list of invite suggestions by auto-scrolling to bottom of page. | |
Once no more suggestions are left to load it will auto-connect to all by clicking all | |
Connect buttons (with 100ms interval between each click). | |
How to run: Run the below code in your browser's Javascript console (see | |
Developer Tools in chrome). DO NOT close or change the browser tab whilst this is running. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; | |
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MONGO_DATABASE="name here" | |
APP_NAME="name of app" | |
MONGO_HOST="127.0.0.1" | |
MONGO_PORT="27017" | |
TIMESTAMP=`date +%F-%H%M` | |
MONGODUMP_PATH="/usr/bin/mongodump" | |
BACKUPS_DIR="/opt/backup/$APP_NAME" |
NewerOlder