Skip to content

Instantly share code, notes, and snippets.

View BH3Techs's full-sized avatar

Howard Mabhugu BH3Techs

View GitHub Profile
If you are facing the following error while trying to connect to a MySQL server using the MySQL Workbench snap and Ubuntu Focal Fossa: "mysql workbench an apparmor policy prevents this sender [...]"
You might try the following solution:
1 - On a new terminal window, run the following commands:
# snap connect mysql-workbench-community:password-manager-service
# snap connect mysql-workbench-community:ssh-keys
By using snap connect, you will fix the issue with the MySQL Workbench snap, allowing you to connect to the server(s).
pragma solidity >=0.7.0 <0.9.0;
contract Base {
uint x;
constructor() public {
x = 10;
}
pragma solidity >=0.7.0 <0.9.0;
contract Base {
uint public num;
address public sender;
function setNum(uint _num) public {
num = _num;
sender = msg.sender;
}
@BH3Techs
BH3Techs / postman-external-require-browserify-cdn.js
Created October 12, 2022 06:30 — forked from kevinswiber/postman-external-require-browserify-cdn.js
Postman pre-request script to set init and cleanup environment variables that pull down browserify bundles from the browserify service.
/*
This is a pre-request script for Postman collections, folders, or requests that imports
packages from npm after bundling them through [Browserify-CDN](https://wzrd.in/).
## Usage
In global, collection, or environment variables, define a variable named `dependencies`
that lists packages to import in the form `<package-name>@<version>`. To include
multiple packages, separate the package specs with commas
(e.g., `async@latest,debug@4.1.1`).
@BH3Techs
BH3Techs / script.js
Created October 4, 2022 09:48 — forked from loopDelicious/script.js
Example of writing to a local file
var express = require('express');
var fs = require('fs');
var bodyParser = require('body-parser');
var app = express();
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json()); // Body parser use JSON data
app.post('/launches', function(req, res) {