Skip to content

Instantly share code, notes, and snippets.

View cnmoro's full-sized avatar
🎯
Focusing

Carlo Moro cnmoro

🎯
Focusing
View GitHub Profile
@cnmoro
cnmoro / Brasil Bounds
Created January 3, 2020 16:59
Brasil Bounds
-54.7998047, -25.8789944
-54.1406250, -26.0567829
-53.9428711, -26.9024769
-54.8657227, -27.5472415
-56.1181641, -28.3624017
-57.1508789, -29.5734571
-57.7880859, -30.2590672
-57.3706055, -30.4865508
-56.9091797, -30.4297296
-56.3598633, -30.7512778
@cnmoro
cnmoro / SonarQube Mini Guia
Created December 13, 2019 16:15
SonarQube Mini Guia
sudo docker run -d --name sonarqube -p 9000:9000 sonarqube
## se ja existir
# docker ps
# sudo docker restart ID
com gradle 5.5.1 ou maior >
alterar ~/.gradle/gradle.properties
adicionar: systemProp.sonar.host.url=http://localhost:9000
@cnmoro
cnmoro / MongoDB Create ReadOnly
Created December 6, 2019 13:19
MongoDB Create ReadOnly
db.createUser(
{
user: "USR",
pwd: "PASS",
roles: [
{ role: "read", db: "DB1" },
{ role: "read", db: "DB2" },
{ role: "read", db: "DB3" }
]
}
@cnmoro
cnmoro / Nemo - Open Visual Studio Code in the current directory via context menu
Created December 2, 2019 13:26
Nemo - Open Visual Studio Code in the current directory via context menu
Nemo - Open Visual Studio Code in the current directory via context menu
Save this file under ~/.local/share/nemo/actions/ to allow launching VS Code in the current folder by right-clicking on empty space, like in MS Windows.
Replace code with code-oss in lines 5 and 10 if you are using the "Microsoft Code" open source edition.
If you have "Show icons in menus" enabled in Nemo, do this:
sudo ln -sf "/usr/share/code/resources/app/resources/linux/code.png" "/usr/local/share/icons/code.png"
>>>>>>>>>> (file vscode-current-dir.nemo_action)
@cnmoro
cnmoro / ISO-8859-1 to UTF-8
Created November 8, 2019 15:58
ISO-8859-1 to UTF-8
iconv -f iso-8859-1 -t utf-8 FILE_NAME > FILE_NAME_UTF8
@cnmoro
cnmoro / Linux kill process by name
Created November 6, 2019 18:09
Linux kill process by name
ps -ef | grep your_process_name | grep -v grep | awk '{print $2}' | xargs kill
@cnmoro
cnmoro / Remove Auto Activate Base from Conda
Created November 6, 2019 14:35
Remove Auto Activate Base from Conda
conda config --set auto_activate_base False
@cnmoro
cnmoro / Cedilha Linux Mint Teclado Americano
Created October 30, 2019 20:39
Cedilha Linux Mint Teclado Americano
@https://superuser.com/questions/1075992/cedilla-under-c-%c3%a7-in-us-international-with-dead-keys-keyboard-layout-in-linu
Layout:
English (US, intl., with dead keys)
1. Edit configuration files:
sudo vim /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache
sudo vim /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules.cache
On both, find the lines starting with "cedilla" "Cedilla" and add :en to the line. Something like this:
@cnmoro
cnmoro / Apache Drill 1.15 Mongo Config
Created October 22, 2019 14:59
Apache Drill 1.15 Mongo Config
http://localhost:8047
Options>
drill.exec.functions.cast_empty_string_to_null : true.
store.mongo.all_text_mode : true.
store.mongo.bson.record.reader : false.
--
@cnmoro
cnmoro / MongoDB Kill all operations
Created October 22, 2019 13:31
MongoDB Kill all operations
db.currentOp().inprog.forEach(function(cop){db.killOp(cop.opid)})