Skip to content

Instantly share code, notes, and snippets.

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

Danilo Dorgam danilodorgam

🏠
Working from home
  • Dorgam Network
  • Brasília DF
  • 19:13 (UTC -03:00)
View GitHub Profile
var arrays = [
[1, 4, 6, 78, 8, 9, 124, 44],
[44, 6, 9],
[124, 44, 16, 9]
];
function getCommonElements(arrays){//Assumes that we are dealing with an array of arrays of integers
var currentValues = {};
var commonValues = {};
for (var i = arrays[0].length-1; i >=0; i--){//Iterating backwards for efficiency
currentValues[arrays[0][i]] = 1; //Doesn't really matter what we set it to
@danilodorgam
danilodorgam / weblogic.txt
Created November 10, 2019 16:54
Descobrir senha de administrador no weblogic
Arquivo com a senha criptrografada
CAMINHO_PARA_A_PASTA_base_domain/init-info/config-nodemanager.xml
<nod:password>{AES}???????????????????????????????????/=</nod:password>
abrir o console Wlst
rodar os comandos abaixo?
CAMINHO_PARA_A_PASTA_oracle_common/common/bin/wlst.sh
domain ="CAMINHO_PARA_A_PASTA_base_domain"
@danilodorgam
danilodorgam / EnableCors.php
Created June 15, 2018 21:01
Script para liberar acesso via API por outros domínio (Liberar o Cors)
//app/Http/Middleware/EnableCors.php
<?php
namespace App\Http\Middleware;
use Closure;
class EnableCors
{
/**
@danilodorgam
danilodorgam / wkhtmltopdf_xvfb_centos_7.md
Last active June 6, 2018 17:52
Instalando o wkhtmltopdf com xvfb no CentOS/Red Hat 7

Instalando o wkhtmltopdf com xvfb no CentOS 7

Instalando o wkhtmltopdf

verifique sempre a última versão estável no site https://wkhtmltopdf.org/downloads.html

wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar xf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
@danilodorgam
danilodorgam / README.md
Last active June 6, 2018 14:19
wkhtmltopdf centos 7 headless with xvfb

wkhtmltopdf centos 7 headless with xvfb

Install and run standalone Xvfb

yum install xorg-x11-server-Xvfb
yum install xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-centos7-amd64.rpm
rpm -ivh wkhtmltox-0.12.2.1_linux-centos7-amd64.rpm
PRIMEIRA COISA
https://copr.fedorainfracloud.org/coprs/duh/GNOME_3.22_for_RHEL_and_CentOS_7.x/
#############################################################################################################################
#
# INSTALAÇÃO DO CENTOS 7.2 - CUSTOMIZAÇÃO BÁSICA
#
#############################################################################################################################
# Passos básicos - Configuração do Gnome (como root)R
@danilodorgam
danilodorgam / Install.md
Created May 5, 2018 21:30 — forked from zhiephie/Install.md
Installing nginx, php7-fpm with opcache, memcached, phpredis and xdebug extension on Centos 7

run ./setup.sh

Install Nginx

# yum repository  
$ vim /etc/yum.repos.d/nginx.repo
  [nginx]
  name=nginx repo
  baseurl=http://nginx.org/packages/centos/7/$basearch/
 gpgcheck=0
#!/bin/bash
USER="root"
PASSWORD=""
FILES="/Users/tenold/Backups/MySQL/*"
for f in $FILES
do
echo "Processing $f file..."
@danilodorgam
danilodorgam / db.sh
Last active September 6, 2019 21:30
faz backup de todos os bancos de dados (individualmente) em formato .sql
#!/bin/bash
echo "Digite um user de banco de dados valido:"
read USER;
echo "Digite uma senha valida para o user"
read PASSWORD;
databases=`mysql -u $USER -p$PASSWORD -e "SHOW DATABASES;" | tr -d "| " | grep -v Database`
@danilodorgam
danilodorgam / comandos-docker
Created October 27, 2017 10:22 — forked from morvanabonin/comandos-docker
Comandos do Docker
Segue a lista de comandos docker e sua utilidade:
docker attach – Acessar dentro do container e trabalhar a partir dele.
docker build – A partir de instruções de um arquivo Dockerfile eu possa criar uma imagem.
docker commit – Cria uma imagem a partir de um container.
docker cp – Copia arquivos ou diretórios do container para o host.
docker create – Cria um novo container.
docker diff – Exibe as alterações feitas no filesystem do container.
docker events – Exibe os eventos do container em tempo real.
docker exec – Executa uma instrução dentro do container que está rodando sem precisar atachar nele.