Skip to content

Instantly share code, notes, and snippets.

View jplana's full-sized avatar

Jose Plana jplana

  • Telefonica Digital España.
  • Madrid
  • X @jplana
View GitHub Profile
@jplana
jplana / route53.py
Last active November 12, 2021 07:29 — forked from rmarchei/route53.py
route53 hook for dehydrated - python2 / python3 + boto2 version. Tested on Ubuntu 16.04
#!/usr/bin/env python3
# How to use:
#
# Ubuntu 16.04: apt install -y python-boto OR apt install -y python3-boto
#
# Specify the default profile on aws/boto profile files or use the optional AWS_PROFILE env var:
# AWS_PROFILE=example ./dehydrated -c -d example.com -t dns-01 -k /etc/dehydrated/hooks/route53.py
#
# Manually specify hosted zone:
@jplana
jplana / slack_history.py
Created August 1, 2020 20:51 — forked from Chandler/slack_history.py
Download Slack Channel/PrivateChannel/DirectMessage History
# MIT License
# Copyright (c) 2016 Chandler Abraham
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@jplana
jplana / ca.md
Created March 20, 2019 06:29 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@jplana
jplana / tmux-cheatsheet.markdown
Created April 24, 2017 09:49 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jplana
jplana / proxy-config.ldif
Created January 22, 2017 02:41 — forked from bodgit/proxy-config.ldif
OpenLDAP proxy using translucent and pcache overlays
dn: cn=config
objectClass: olcGlobal
cn: config
olcArgsFile: /home/matt/ldap/proxy/slapd.args
olcPidFile: /home/matt/ldap/proxy/slapd.pid
dn: cn=schema,cn=config
objectClass: olcSchemaConfig
cn: schema
@jplana
jplana / ansible.rb
Created September 6, 2016 13:39
Ansible formula for brew to install ansible 2.1.1 rc5
class Ansible < Formula
desc "Automate deployment, configuration, and upgrading"
homepage "https://www.ansible.com/"
url "http://releases.ansible.com/ansible/ansible-2.1.1.0-0.5.rc5.tar.gz"
sha256 "2e6dbe03098f860e1b1829546d2dbbb6d617d2884c008372d40278f863541c3f"
head "https://github.com/ansible/ansible.git", :branch => "devel"
# bottle do
# cellar :any
#!/bin/sh
HOST=$1
/etc/init.d/denyhosts stop
cd /var/lib/denyhosts
for i in `ls`; do mv $i $i.old; grep -v $HOST $i.old >> $i; done
cp /etc/hosts.deny /tmp/hosts.deny
@jplana
jplana / flask_geventwebsocket_example.py
Created June 17, 2012 18:16 — forked from lrvick/flask_geventwebsocket_example.py
Simple Websocket echo client/server with Flask and gevent / gevent-websocket
from geventwebsocket.handler import WebSocketHandler
from gevent.pywsgi import WSGIServer
from flask import Flask, request, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')