Skip to content

Instantly share code, notes, and snippets.

View wagnermarques's full-sized avatar

Wagner Marques wagnermarques

View GitHub Profile
@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}'
@wagnermarques
wagnermarques / gist:8607273
Created January 24, 2014 21:46
Generate new ssh key and add it in github
ssh-keygen -t rsa -C "[email protected]"
apt-get install ssh
xclip -sel clip < ~/.ssh/id_rsa.pub
https://github.com/settings/ssh#
administrador@curupiracgcnn:~/fzlbpms/etc/emacs/sitelisp$ ssh -T [email protected]
Warning: Permanently added the RSA host key for IP address '192.30.252.130' to the list of known hosts.
Enter passphrase for key '/home/administrador/.ssh/id_rsa':
Hi wagnermarques! You've successfully authenticated, but GitHub does not provide shell access.
@wagnermarques
wagnermarques / gist:8578179
Created January 23, 2014 13:08
Install nodejs
cd /home/administrador/PROGSATIVOS/
tar xvf node-v0.10.24-linux-x86.tar.gz
echo "export PATH=$PATH:/home/administrador/PROGSATIVOS/node-v0.10.24-linux-x86/bin/" >> /etc/profile