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
VSCODE: "keyboard.dispatch": "keyCode" | |
Motospeed Driver -> Alt_R:Up, Win_R:F2, Ctrl_R:Macro F11+F12, Fn:Down, CapsLock:ScrollLock, BackSpace:Delete | |
Shift & Esc:: | |
Send {SHIFT}{~} | |
Return | |
Scrolllock & Esc:: | |
Send {``} | |
Return |
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
VSCODE: "keyboard.dispatch": "keyCode" | |
Motospeed Driver -> Alt_R:Up, Win_R:F2, Ctrl_R:Macro F11+F12, Fn:Down, CapsLock:ScrollLock, BackSpace:Delete | |
nano ~/.Xmodmap | |
keycode 78 = Mode_switch | |
keysym a = a A Left | |
keysym s = s S Down | |
keysym d = d D Right | |
keysym w = w W Up | |
keysym Escape = Escape dead_tilde dead_grave |
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
amd_iommu=on ivrs_ioapic[4]=00:14.0 ivrs_ioapic[5]=00:00.2 idle=nomwait | |
Grub or kernelstub -a |
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
// https://www.sitepoint.com/javascript-generate-lighter-darker-color/ | |
function ColorLuminance(hex, lum) { | |
// validate hex string | |
hex = String(hex).replace(/[^0-9a-f]/gi, ''); | |
if (hex.length < 6) { | |
hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]; | |
} | |
lum = lum || 0; |
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
lat_top_left = 5.9657537 | |
lon_top_left = -75.7617188 | |
lat_btm_right = -34.3797126 | |
lon_btm_right = -33.8378906 | |
qtdd_split_ratio = 5 | |
piece_lat_div = (lat_top_left - lat_btm_right) / qtdd_split_ratio | |
piece_lon_div = (lon_btm_right - lon_top_left) / qtdd_split_ratio |
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
mongodump -d DATABASE -o ABSOLUTE_PATH_TO_DUMP IBGE -u USR -p PASS --authenticationDatabase=admin --authenticationMechanism=SCRAM-SHA-1 |
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
https://www.mongodb.com/download-center/bi-connector | |
./mongosqld --mongo-uri "mongodb://localhost:27017" --auth --mongo-username USERNAME --mongo-password PASSWORD --addr 0.0.0.0 |
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
db.adminCommand( { setParameter: 1, maxIndexBuildMemoryUsageMegabytes: 70000 } ) |
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
package com.yourdomain.package; | |
import java.io.IOException; | |
import javax.ws.rs.container.ContainerRequestContext; | |
import javax.ws.rs.container.ContainerResponseContext; | |
import javax.ws.rs.container.ContainerResponseFilter; | |
import javax.ws.rs.ext.Provider; | |
@Provider |
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
Error = [ERROR] Could not open file '/var/log/mysql/error.log' for error logging: Permission denied | |
Resolution | |
Set an owner, a group and permissions to the correct one: | |
chown mysql:adm /var/log/mysql/error.log | |
chown mysql:adm /var/log/mysql | |
chown root:syslog /var/log | |
# chown root:root /var | |
chmod 0640 /var/log/mysql/error.log |