Skip to content

Instantly share code, notes, and snippets.

@btalanski
btalanski / mysql_workbench_an_apparmor_policy_prevents_this_sender.txt
Created July 11, 2020 15:09
Mysql workbench an apparmor policy prevents this sender
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).
// material.module.ts
import { ModuleWithProviders, NgModule} from "@angular/core";
import { MatNativeDateModule, MAT_DATE_LOCALE } from '@angular/material/core';
import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
import { MatIconRegistry } from '@angular/material/icon';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatBadgeModule } from '@angular/material/badge';
import { MatButtonModule } from '@angular/material/button';
import { MatButtonToggleModule } from '@angular/material/button-toggle';
import { MatCardModule } from '@angular/material/card';
@aristidesneto
aristidesneto / backup_database.sh
Last active December 16, 2020 20:33
Backup de banco de dados Mysql
#!/bin/bash
#
# Autor: Aristides Neto
# Email: falecom@aristides.dev
#
# Data: 09/06/2019
#
# Realiza o backup de bancos de dados MySQL
#
@alexishida
alexishida / rtsp-intelbras-outros.txt
Last active August 19, 2024 03:30
RTSP dvr intelbras e outros
-------- Intelbras -------------------------------------------------------
rtsp://usuário:senha@ip:porta/cam/realmonitor?channel=1&subtype=0
-------- Luxvision -------------------------------------------------------
rtsp://ip:porta/user=[usuário]&password=[senha]&channel=1&stream=0.sdp
-------- Hikvision -------------------------------------------------------
rtsp://usuário:senha@ip:porta/Streaming/Channels/102
@daniellmb
daniellmb / calc-rem.js
Last active November 3, 2023 18:28
PX-to-REM Calculator
(function($) {
var result = $('#result');
var base = $('#base');
var list = $('#list');
$('#calc').click(function() {
var baseVal = base.val();
var px = list.val().split(',');
var html = [];
$.each(px, function(i, v) {
var px = parseInt(v);
@paulirish
paulirish / what-forces-layout.md
Last active September 22, 2024 11:16
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@leocomelli
leocomelli / git.md
Last active September 21, 2024 23:25
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@jtgasper3
jtgasper3 / web.xml
Created April 11, 2014 21:01
Force Tomcat to redirect all HTTP traffic to HTTPS.
<!--
To force Tomcat to redirect and revert all requested HTTP traffic over to HTTPS, configure the `conf/web.xml` file with the below block.
This should be placed at the very end of the file near and above the ending `</webapp>` tag:
-->
<security-constraint>
<web-resource-collection>
<web-resource-name>Automatic Forward to HTTPS/SSL
</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>