Skip to content

Instantly share code, notes, and snippets.

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

Held Grijo shadyueh

🏠
Working from home
View GitHub Profile
#!/bin/bash
# Add spotify gpg behind proxy
sudo apt-key adv --keyserver keyserver.ubuntu.com --keyserver-options http-proxy=http://proxy.com:port --recv-keys 0DF731E45CE24F27EEEB1450EFDC8610341D9410
export http_proxy=http://<proxy>:<port>
export https_proxy=http://<proxy>:<port>
sudo -E add-apt-repository ppa:webupd8team/java
@shadyueh
shadyueh / catalina.out
Created May 23, 2018 21:19
Tomcat8 error
23-May-2018 17:17:25.761 INFORMAÇÕES [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
23-May-2018 17:17:25.768 INFORMAÇÕES [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
23-May-2018 17:17:25.770 INFORMAÇÕES [main] org.apache.catalina.startup.Catalina.start Server startup in 1250 ms
23-May-2018 17:18:06.685 INFORMAÇÕES [http-nio-8080-exec-2] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/opt/tomcat8/webapps/afim-teste.war]
23-May-2018 17:18:07.314 ADVERTÊNCIA [http-nio-8080-exec-2] java.util.jar.Attributes.read Duplicate name in Manifest: Class-Path.
Ensure that the manifest does not have duplicate entries, and
that blank lines separate individual sections in both your
manifest and in the META-INF/MANIFEST.MF entry in the jar file.
23-May-2018 17:18:07.314 ADVERTÊNCIA [http-nio-8080-exec-2] java.util.jar.Attributes.read Duplicate name in Manifest: Class-Path.
Ensure that the manifest does
@shadyueh
shadyueh / ssh.sh
Created April 9, 2021 05:02 — forked from zircote/ssh.sh
Convert a AWS PEM into a ssh pub key
ssh-keygen -y -f private_key1.pem > public_key1.pub
@shadyueh
shadyueh / import.md
Created June 21, 2021 17:10 — forked from iamstoick/import.md
How to import database in MySQL in Docker?

This is a simple way of importing MySQL database in Docker.

  1. In you Dockerfile you must have a shared folder. Shared folder is a directory in your host machine that is mounted to Docker instance.

  2. Put the exported sql file in the shared folder.

  3. Login to your Docker instance via docker exec -it DOCKER_CONTAINER_ID bin/bash.

  4. Login to MySQL via mysql -u USERNAME -p.

@shadyueh
shadyueh / linux_commands.sh
Created August 17, 2021 12:35
Comandos uteis
# listar portas abertas
sudo lsof -i -P -n | grep LISTEN
<?php
$date = new DateTime('now');
$date->modify('first day of this month');
echo $date->format('Y-m-d');
$date->modify('last day of this month');
echo $date->format('Y-m-d');
# check if docker socket exists
ls -la /var/run/docker.sock
# add current user to docker group
sudo chown $USER:docker /var/run/docker.sock
gs -sOutputFile=outfile.pdf -sDEVICE=pdfwrite \
-sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray \
-dCompatibilityLevel=1.4 infile.pdf < /dev/null