Skip to content

Instantly share code, notes, and snippets.

View silvae86's full-sized avatar

João Rocha da Silva silvae86

View GitHub Profile
@silvae86
silvae86 / _etc_default_jenkins
Last active November 13, 2017 17:44
Jenkins Configs
#Jenkins settings
# Allow graphs etc. to work even when an X server is present
JAVA_ARGS="-Djava.awt.headless=true -server -XX:+AlwaysPreTouch -Xloggc:$JENKINS_HOME/gc-%t.log -XX:NumberOfGCLogFiles=5 -XX:+UseGCLogFileRotation -XX:GCLogFileSize=20m -XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+PrintHeapAtGC -XX:+PrintGCCause -XX:+PrintTenuringDistribution -XX:+PrintReferenceGC -XX:+PrintAdaptiveSizePolicy -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent -XX:+ParallelRefProcEnabled -XX:+UseStringDeduplication -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=20 -XX:+UnlockDiagnosticVMOptions -XX:G1SummarizeRSetStatsPeriod=1 -Xmx768m -Xmx768m"
@silvae86
silvae86 / replace_typeof_undefined.js
Created June 11, 2017 20:54
Replace typeof var !== "undefined" in file using JavaScript
fs = require('fs')
var file = process.argv[2];
function replaceAll(str, needle, replacement) {
return str.split(needle).join(replacement);
}
console.log("Processing file " + file);
@silvae86
silvae86 / Screen Shot 2017-05-02 at 15.48.19.png
Last active May 3, 2017 17:05
Install DSpace 6.x on Ubuntu 16.04 with custom metadata importing template via CSV (BTE configuration)
Screen Shot 2017-05-02 at 15.48.19.png
@silvae86
silvae86 / apache_modproxy_safe.md
Created April 25, 2017 18:45
configure reverse proxy without making it open as a public proxy

http://stackoverflow.com/questions/820310/risk-of-using-apache-mod-proxy

I am now exploring to use Apache's mod_proxy's directive, eg ProxyPass, as part of solution for cross-domain scripting restriction (for html/ajax/flash code). However, I am afraid by enabling mod_proxy, I would risk having the server as open proxy.

What's the risk, and how to minimize the risk, in short?

Thanks.

Since you specifically mentioned ProxyPass, I'll assume you're using mod_proxy as a reverse proxy.

This file has been truncated, but you can view the full file.
INFO global: Vagrant version: 1.9.3
INFO global: Ruby version: 2.2.5
INFO global: RubyGems version: 2.4.5.1
INFO global: VAGRANT_LOG="debug"
INFO global: VAGRANT_OLD_ENV_PATH="/home/jrocha/bin:/home/jrocha/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin"
INFO global: VAGRANT_OLD_ENV_SHLVL="2"
INFO global: VAGRANT_OLD_ENV_J2SDKDIR="/usr/lib/jvm/java-8-oracle"
INFO global: VAGRANT_OLD_ENV_SHELL="/bin/bash"
INFO global: VAGRANT_OLD_ENV_TERM="xterm"
INFO global: VAGRANT_OLD_ENV_SSH_CLIENT="10.3.3.6 62396 22"
This file has been truncated, but you can view the full file.
INFO global: Vagrant version: 1.9.3
INFO global: Ruby version: 2.2.5
INFO global: RubyGems version: 2.4.5.1
INFO global: VAGRANT_SHELL_ARGS=""
INFO global: VAGRANT_VM_NAME="dendroVagrantDemo"
INFO global: VAGRANT_LOG="debug"
INFO global: VAGRANT_VM_INSTALL="true"
INFO global: VAGRANT_VM_IP="192.168.56.249"
INFO global: VAGRANT_OLD_ENV_JENKINS_HOME="/var/lib/jenkins"
INFO global: VAGRANT_OLD_ENV_HUDSON_HOME="/var/lib/jenkins"
#!/bin/bash
sudo apt-add-repository ppa:tista/adapta -y
sudo apt-get update
sudo apt-get install adapta-gtk-theme
@silvae86
silvae86 / perfectelementary.bash
Last active March 30, 2017 08:41
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Install Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
@silvae86
silvae86 / unetbbootin.md
Created March 29, 2017 20:43
Make UnetBootin image bootable on a Mac (since it does not do the only thing it should)
@silvae86
silvae86 / scratch_pad.js
Created March 3, 2017 16:42
Dendro Code Dumps
var query =
"SELECT * \n" +
"FROM [0] \n" +
"WHERE { \n" +
"{ \n" +
" ?uri ddr:handle ?handle . \n" +
" ?uri dcterms:creator [1] .\n"+
" ?uri dcterms:title ?title .\n"+
" ?uri dcterms:description ?description . \n" +
" ?uri dcterms:subject ?subject . \n" +