Skip to content

Instantly share code, notes, and snippets.

View alinefr's full-sized avatar

Aline Freitas alinefr

  • São Paulo/SP, Brazil
View GitHub Profile
@alinefr
alinefr / kit-aluno-aula-2
Created April 4, 2024 13:39
Arquivo docker-compose.yml para a aula de Banco de Dados
version: "3.4"
volumes:
volume_mysql_data:
services:
db:
image: alinefr/voos_eua_2016_mysql_sem_indices:latest
volumes:
@alinefr
alinefr / low-battery-level-detection-notification-for-all-battery-sensors.yaml
Last active July 24, 2023 21:09 — forked from sbyx/low-battery-level-detection-notification-for-all-battery-sensors.yaml
Home Assistant Blueprint: Low battery level detection & notification for all battery sensors
blueprint:
name: Low battery level detection & notification for all battery sensors
description: Regularly test all sensors with 'battery' device-class for crossing
a certain battery level threshold and if so execute an action.
domain: automation
input:
threshold:
name: Battery warning level threshold
description: Battery sensors below threshold are assumed to be low-battery (as
well as binary battery sensors with value 'on').

Keybase proof

I hereby claim:

  • I am alinefr on github.
  • I am alinefr (https://keybase.io/alinefr) on keybase.
  • I have a public key ASAgZPW-XDIlZtrGDIw4smgd9a-xH3Ea8omlDB2XF8yqvAo

To claim this, I am signing this object:

@alinefr
alinefr / chef-azure.md
Last active June 24, 2017 05:03
Como criar uma VM azure usando chef.

Criando uma VM azure usando chef.

O propósito aqui é de criar uma VM Azure usando chef em local-mode, ou seja a partir de uma máquina de trabalho.

  1. Instalar ChefDK https://downloads.chef.io/chefdk

  2. Instalar o plugin chef-provisioning-azurerm
    Em qualquer terminal, seja num sistema Linux, Mac ou Windows Powershell o procedimento é o mesmo.

@alinefr
alinefr / wp-mysqldump.sh
Last active June 27, 2024 13:09
Generate mysqldump from mysql for wordpress running in a container.
#!/bin/bash
# -------------------------------------------------------------------------
# Script to generate mysqldump from wordpress running inside a container
#
# Copyright (C) 2016 Aline Freitas <[email protected]>
#
# It has two command line arguments:
# -c: the docker container name
# -d: the html volume in your host pointing to the root of your wordpress installation.
# It needs to be where exist the wp-config.php file.
@alinefr
alinefr / check_cloudflare_lastpass.py
Last active March 1, 2017 05:21 — forked from anp/check_cloudflare_lastpass.py
Check a LastPass CSV export for potential CloudFlare vulnerabilities
"""
This is the product of me spending a few minutes trying to
assess how much of my LastPass vault is potentially vulnerable
to the recent CloudFlare issue.
It's hacky, and probably broken in some way, but it's a start.
Gist comments with improvements very welcome.
"""
@alinefr
alinefr / autolock.sh
Created December 24, 2016 08:11 — forked from yrps/autolock.sh
Xautolock locker and notifier wrapper: systemctl suspend and dunst aware
#!/bin/sh
set -eu
# This script is intended to be run as the xautolock locker and notifier.
# It requires i3lock, and dunst is optional.
# Copy or link this script as /usr/bin/slock to let xfce4-session run it.
if [ "$(basename "$0")" = "slock" ]; then
cmd=lock
#!/bin/sh
#
# Copyright (C) 1995 - 1998, Ian A. Murdock <[email protected]>
# Copyright (C) 1998, 1999, Guy Maor
# Copyright (C) 2002, Matthew Wilcox
# Copyright (C) 2002, 2004, 2005, 2007, 2009 Clint Adams
# Copyright (C) 2009 Manoj Srivasta
# Copyright (C) 2016 Aline Freitas
#
# This script is called from /usr/src/linux/arch/i386/boot/install.sh.

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@alinefr
alinefr / delete_repos.py
Last active June 20, 2022 13:05
Simple python script to delete multiple github repositories.
import os
import requests
token = '' # token needs delete_repo permission
organization = '' # or user
url = 'https://api.github.com/repos/{}'.format(organization)
headers = {'Accept': 'application/vnd.github.v3+json',
'Authorization': 'token {}'.format(token)}