sudo vi /etc/systemd/logind.conf
HandleLidSwitch=ignore
sudo systemctl restart systemd-logind
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
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
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
[Desktop Entry] | |
Encoding=UTF-8 | |
Version=1.0 | |
Type=Application | |
NoDisplay=true | |
Exec=/opt/firefox/firefox-bin %u | |
Name=Firefox | |
Comment=Definição personalizada para Firefox |
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
import os | |
from kafka import KafkaProducer, KafkaConsumer | |
BOOTSTRAP_SERVERS=os.gentenv("KAFKA_BOOTSTRAP_SERVERS").split(",") | |
TOPIC_NAME="the-topic" | |
SASL_USERNAME=os.gentenv("KAFKA_SASL_USERNAME") | |
SASL_PASSWORD=os.gentenv("KAFKA_SASL_PASSWORD") | |
def consume(): | |
consumer = KafkaConsumer(TOPIC_NAME, security_protocol="SASL_SSL", sasl_mechanism="SCRAM-SHA-512", sasl_plain_username=SASL_USERNAME, sasl_plain_password=SASL_PASSWORD, bootstrap_servers=BOOTSTRAP_SERVERS) |
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 a group | |
CREATE ROLE readaccess; | |
-- Grant access to existing tables | |
GRANT USAGE ON SCHEMA public TO readaccess; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
-- Grant access to future tables | |
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |
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
# thanks to https://apple.stackexchange.com/a/236425/379437 | |
#!/bin/bash | |
while true ; do | |
while (( `osascript -e "input volume of (get volume settings)"` > 50 )); do | |
osascript -e "set volume input volume (input volume of (get volume settings) - 2)"; | |
sleep 0.01; | |
done; | |
sleep 1; | |
done; |
NewerOlder