Skip to content

Instantly share code, notes, and snippets.

View wagnermarques's full-sized avatar

Wagner Marques wagnermarques

View GitHub Profile
from: https://docs.python.org/3/library/venv.html
$projdir="/dir/to/your_project
cd $projdir
apt install python3.12-venv
python3 -m venv $projdir //criar o diretorio bin no seu projeto
source bin/activate //ativa o ambiente virtual
@wagnermarques
wagnermarques / oracledownload
Created January 27, 2017 15:05 — forked from hgomez/oracledownload
Oracle JVM download using curl/wget
# Downloading Oracle JVM without browser
Oracle requires you to accept its licence agreement before downloading its JVM.
It's a pain for those of us who do automation, native packages, Jenkins JVM deployment on slave...
I used Firefox and Firebug to sniff network exchanges.
## HTTP Request :
GET /otn-pub/java/jdk/6u39-b04/jdk-6u39-linux-i586.bin?AuthParam=1359814101_9685f919f8b3113a89574ec4570d47b2 HTTP/1.1
@wagnermarques
wagnermarques / install-java-8.sh
Created January 27, 2017 14:41 — forked from voor/install-java-8.sh
Install Oracle Java 8 RPM
## You need to sudo this script, as it will install RPMs and run alternatives.
## You must accept the Oracle Binary Code License Agreement for Java SE to download this software.
## Read more here: http://www.oracle.com/technetwork/java/javase/terms/license/index.html
curl -L -H "Cookie: gpw_e24=xxx; oraclelicense=accept-securebackup-cookie;" http://download.oracle.com/otn-pub/java/jdk/8u74-b02/jdk-8u74-linux-x64.rpm -o /tmp/jdk-8-linux-x64.rpm && \
yum install -y /tmp/jdk-8-linux-x64.rpm && \
rm -rf /tmp/jdk-8-linux-x64.rpm
## OpenJDK started using 18000XX as their priority, so kick it up to 2 million to surpass them.
## java ##
#!/bin/bash
#get default printer
#http://www.thegeekstuff.com/2015/01/lpadmin-examples/?utm_source=feedburner&utm_medium=email&utm_campaign=Feed%3A+TheGeekStuff+%28The+Geek+Stuff%29
#http://aplawrence.com/Unixart/cups_sysv_interface.html
echo "default printer from printer.conf"
cat /etc/cups/printers.conf | grep DefaultPrinter | awk '{ print $2 }' | sed 's/>//g'
echo "default printer from lpstat -d"
cat lpstat -d | awk '{print $4}'