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 / adium_send.scpt
Created April 9, 2012 13:10
AppleScript to send xmpp message to contact from command line using Adium
#!/usr/bin/env osascript
on run argv
set contactName to item 1 of argv
tell application "Adium" to send chat contactName message item 2 of argv
end run
@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')
#!/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 / keybase.md
Created September 22, 2014 18:50
keybase.md

Keybase proof

I hereby claim:

  • I am jplana on github.
  • I am jplana (https://keybase.io/jplana) on keybase.
  • I have a public key whose fingerprint is 748F 5409 C626 D229 C286 41F3 7B83 D7C0 F5E4 EC6A

To claim this, I am signing this object:

@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
@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 / 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 / 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.

This is a test
@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: