Skip to content

Instantly share code, notes, and snippets.

View felubra's full-sized avatar
🏠
Working from home

Felipe Lube de Bragança felubra

🏠
Working from home
View GitHub Profile
@felubra
felubra / ies.json
Last active June 12, 2019 19:54
Lista de instituições de ensino superior do Brasil
[
{
"estado": "Acre",
"tipo": "",
"sigla": "Ifac",
"nome": "Instituto Federal do Acre"
},
{
"estado": "Acre",
"tipo": "",
@felubra
felubra / restore-drupal.txt
Created October 1, 2018 13:48
Install Drupal 8 from existing configuration
Source: https://weknowinc.com/blog/how-install-drupal-8-existing-configuration
drupal init --site --no-interaction
drupal site:install --force --no-interaction --db-type=sqlite --db-name=sites/default/files/.ht.sqlite
drupal config:import --no-interaction --directory=../config/sync
@felubra
felubra / sqlite3_backup.sh
Last active July 16, 2018 09:32 — forked from sdellis/sqlite3_backup.sh
sqlite3 database backup script with .backup command and compression
#!/bin/bash
#
# sqlite3_backup.sh
# Script for backing up and compress a sqlite3 database, using the .backup command
# Intended for use with cron for regular automated backups
#
# @author @felubra https://github.com/felubra
# based on the original sqlite3_backup.sh script by shaune@princeton.edu
# (https://gist.github.com/sdellis/3835123)
@felubra
felubra / imailWebAdminUsers.js
Last active July 16, 2019 13:28
Extracts the user e-mails from the Imail's Web Admin Interface
/***
* Extracts the user e-mails from the Imail's Web Admin Interface.
* Endpoint: UserAdmin.aspx
*/
function getUsersFromComponent(byLine = false) {
const domain = document.querySelector('span#ctl00_ContentPlaceHolder2_dsDomains_lblDomainName').innerText;
const users = ctl00_ContentPlaceHolder2_grdUsers.Data.reduce((accUsers, user) => {
const userName = user[1].toLowerCase();
const isSysAdmin = user[3] === 'Yes';
const isDomainAdmin = user[4] === 'Yes';
@felubra
felubra / gist:4bd9b560984d85d60fa96671cfe83e8a
Last active February 21, 2018 21:04
Update docker service container in docker-compose environment
docker-compose up -d --no-deps --build <service_name>
docker-machine create -d virtualbox \
--engine-env HTTP_PROXY=http://proxy.com:8080 \
--engine-env HTTPS_PROXY=https://proxy.com:8080 \
--engine-env NO_PROXY=example.com \
default
@felubra
felubra / useful-commands-windows.txt
Last active February 1, 2018 19:50
Useful commands - Windows
# Permanently set user Environment Variables - avoid SETX, as it may truncate the paths to 1024 chars
rundll32 sysdm.cpl,EditEnvironmentVariables
# Clear icon cache
ie4uinit.exe -ClearIconCache
# Clear icon cache - Windows 10
ie4uinit.exe -show
@felubra
felubra / shutdown.js
Last active January 12, 2018 00:47
Bring the 'Shutdown Windows' dialog
/**
*
* Disclaimer: This is JScript *not* JavaSript. This is intended to be used in Windows.
*
* This will bring the 'legacy' Shutdown Dialog. Since Windows 10 Fall Creator's Update,
* Windows will restore running apps after a restart or shutdown. Turning off or
* restarting Windows via the 'legacy' dialog forces Windows to the old behaviour.
*
*/
(new ActiveXObject("Shell.Application")).ShutdownWindows();
@felubra
felubra / keybase.md
Last active September 16, 2019 14:49

Keybase proof

I hereby claim:

  • I am felubra on github.
  • I am felubra (https://keybase.io/felubra) on keybase.
  • I have a public key ASAHRv5PJqBmoC3IJlDjUz40JDAvxlKnmn4gqH7IQN_Wxwo

To claim this, I am signing this object: