Skip to content

Instantly share code, notes, and snippets.

1. Configurar IPv4 estático e IPv6 estático no pihole (YMMV)
192.168.1.2 e 2001:818:xxxx::192:168:1:2 no meu caso
2. Configurar DNS uplink do pihole igual ao IP do Router (192.168.1.1)
3. Configurar Router
Huawei HS8247W (Smart Router 2)
1. Configurações Avançadas -> LAN -> Configuração de DHCP
Servidor DNS Primário: 192.168.1.2
@rcarmo
rcarmo / index.md
Last active March 20, 2020 10:05
Remote Work / Teaching Kit

5 Key Points for Teachers/people new to running remote meetings:

  • Get a headset so that others can understand you well (cameras are secondary, good desktop mics are much more expensive).
  • Add an initial slide with class/meeting rules (mute your mic, ask permission to speak, use the chat, etc.)
  • Understand how these three things work: Screen sharing, Mute all (VERY important), Recordings
  • Use the PowerPoint “laser” and annotations to highlight materials and keep people engaged. Also check if the Whiteboard app (https://www.microsoft.com/en-us/p/microsoft-whiteboard/9mspc6mp8fm4) works for your class (it has a web-based version).
  • Pause often and poll the audience for questions, so that newcomers learn the dynamics of unmute/mute, taking turns to speak, etc.

If you can't find a good mic for your computer, consider joining the call/class simuntaneously with your phone (via Wi-Fi) and using that as a mic -- most smartphones these days work well as speakerphones, and big, easy to use buttons to mute audio

@rcarmo
rcarmo / README.md
Created March 5, 2020 17:37 — forked from joyrexus/README.md
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
""" Per-Filetype Scripts
" NOTE: These define autocmds, so they should come before any other autocmds.
" That way, a later autocmd can override the result of one defined here.
filetype on " Enable filetype detection,
filetype indent on " use filetype-specific indenting where available,
filetype plugin on " also allow for filetype-specific plugins,
syntax on " and turn on per-filetype syntax highlighting.
set numberwidth=1 " using only 1 column (and 1 space) while possible
@rcarmo
rcarmo / .zshrc
Last active December 25, 2023 06:41
My zsh configuration
# =======
# GLOBALS
# =======
if [[ "$(uname)" == "Darwin" ]]; then
platform="Darwin"
elif [[ "$(expr substr $(uname -s) 1 5)" == "Linux" ]]; then
platform="Linux"
else
platform="POSIX"
@rcarmo
rcarmo / bottle_github_webook_handler.py
Last active August 21, 2019 18:41
Bottle GitHub WebHook Handler
@post("/handler")
def gitdeploy():
signature = request.headers.get("X-Hub-Signature", None)
if not signature:
abort(400, "Invalid Request")
event = request.headers.get("X-GitHub-Event", None)
if event == "push":
hashed = "sha1=" + hmac.new(GITHUB_WEBHOOK_SECRET, request.body.read(), hashlib.sha1).hexdigest()
if signature == hashed:
# Do Stuff
@rcarmo
rcarmo / .tmux.conf
Last active April 17, 2021 23:01
Raspberry Pi tmux status bar
set-option -g status-right "#(/home/pi/status.sh) %H:%M %d-%b-%y"
@rcarmo
rcarmo / run.csx
Created July 2, 2019 10:08
Simple C# Function to query Azure SQL DB and return JSON reply
#r "Newtonsoft.Json"
using System.Text;
using System.Net;
using System.Linq;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
using System.Collections.Generic;
using System.Collections;
@rcarmo
rcarmo / bt-agent.service
Last active February 19, 2025 12:57
Set up PAN networking on Raspbian Stretch (use sudo to create these files and run all commands)
# in /etc/systemd/system
[Unit]
Description=Bluetooth Agent
[Service]
ExecStart=/usr/bin/bt-agent -c NoInputNoOutput
Type=simple
[Install]
WantedBy=multi-user.target
@rcarmo
rcarmo / build_qemu_debian_image.sh
Created June 19, 2019 14:02 — forked from sigmaris/build_qemu_debian_image.sh
Automate the installation of Debian Buster on a x86_64 QEMU 4.0.0 VM hosted on macOS
#!/bin/bash -e
if [ "$(uname -s)" != "Darwin" ]
then
echo "This script is for building a Debian x86_64 image to use on MacOS"
exit 1
fi
TEMP="$(mktemp -d build.XXXXX)"
cp preseed.cfg $TEMP