Skip to content

Instantly share code, notes, and snippets.

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

Rafael Benevides rafabene

🏠
Working from home
View GitHub Profile
@rafabene
rafabene / instagram-api_direct_messages_backup.js
Last active June 14, 2024 20:06 — forked from baptx/instagram-api_direct_messages_backup.js
Instagram API: view and backup direct messages from a web browser
/*
Instagram API: view and backup direct messages from a web browser
Since April 2020, Instagram has a web version to send and read direct messages so my Instagram scripts are not longer needed and I would not recommend using them unless you really need it, to avoid being banned
(never happened to me with Instagram but WhatsApp is owned by Facebook also and they did it to users registering from an unofficial app like yowsup: https://github.com/tgalal/yowsup/commit/88b8ad9581fa22dac330ee3a05fec4e485dfa634#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5)
1) Log in on Instagram web version and go to your profile page
(the home page will not work because it loads data when scrolling down and the direct messages will be displayed at the bottom of the page)
2) Modify HTTP headers with a browser addon like Header Editor (https://addons.mozilla.org/en-US/firefox/addon/header-editor/)
@rafabene
rafabene / config.js
Created October 8, 2019 00:19
config.js Magic Mirror
/* Magic Mirror Config Sample
*
* By Michael Teeuw http://michaelteeuw.nl
* MIT Licensed.
*
* For more information how you can configurate this file
* See https://github.com/MichMich/MagicMirror#configuration
*
*/
@rafabene
rafabene / automation
Created April 6, 2019 21:40
Home assistant
- id: letsencrypt-renewal
alias: Let's Encrypt Renewal
trigger:
- platform: time
at: 00:00:00
action:
- service: hassio.addon_restart
data:
addon: core_letsencrypt
- id: '1551457245407'
$ for A in {01..50}; do mkdir -p /data/pv$A; chmod 777 /data/pv$A; chcon -Rt svirt_sandbox_file_t /data/pv$A; done
$ for A in {01..50}; do
cat <<EOF>> pv.yaml
apiVersion: "v1"
kind: "PersistentVolume"
metadata:
name: "pv$A"
spec:
capacity:
# Create an OSEv3 group that contains the masters and nodes groups
[OSEv3:children]
masters
nodes
etcd
# Set variables common for all OSEv3 hosts
[OSEv3:vars]
# SSH user, this user should allow ssh based auth without requiring a password
ansible_ssh_user=root
@rafabene
rafabene / Dockerfile
Created May 31, 2016 20:01
Docker che with RHEL and EAP
# JBoss, Home of Professional Open Source
# Copyright 2016, Red Hat, Inc. and/or its affiliates, and individual
# contributors by the @authors tag. See the copyright.txt in the
# distribution for a full listing of individual contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
@rafabene
rafabene / Dockerfile
Last active January 13, 2016 15:11
EAP 6.4 + Ticket-Monster
#From EAP 6.4
FROM registry.access.redhat.com/jboss-eap-6/eap64-openshift
MAINTAINER "Rafael Benevides" <benevides@redhat.com>
ENV USERNAME admin
ENV PASSWORD docker#admin1
#Create admin user
RUN /opt/eap/bin/add-user.sh -u $USERNAME -p $PASSWORD --silent
@rafabene
rafabene / bash
Created December 23, 2015 17:02
Docker swarm build and push
$ docker-compose --x-networking up -d
WARNING:
"wildfly" defines links, which are not compatible with Docker networking and will be ignored.
Future versions of Docker will not support links - you should remove them for forwards-compatibility.
Pulling modcluster (rafabene/mod_cluster:latest)...
aws-swarm-master: Pulling rafabene/mod_cluster:latest... : downloaded
aws-swarm-node-01: Pulling rafabene/mod_cluster:latest... : downloaded
aws-swarm-node-02: Pulling rafabene/mod_cluster:latest... : downloaded
Creating modcluster
@rafabene
rafabene / Instructions
Last active December 17, 2015 01:04
Docker host solution
$ ./swarm-create.sh
$ eval "$(docker-machine env --swarm swarm-master)"
$ docker network create --driver overlay my-swarm-network
$ docker-compose up -d
$ docker exec -ti swarm-node-02/rafaelbenevides_master_1 ping master
PING master (10.0.0.3) 56(84) bytes of data.