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 / debian10.yaml
Created August 5, 2022 12:09
Debian Buster lima host configuration
# This example requires Lima v0.7.0 or later
images:
- location: "https://cloud.debian.org/images/cloud/buster/20220328-962/debian-10-generic-arm64-20220328-962.qcow2"
arch: "x86_64"
digest: "sha512:8f43ae1aa14ee07a2d9eb18f417388c47049d356da1faaeaa21baedb9f8c259d2262491fbb578805d745ca738472550ca7776c672a6004795873f6c2777f173e"
- location: "https://cloud.debian.org/images/cloud/buster/20220328-962/debian-10-generic-arm64-20220328-962.qcow2"
arch: "aarch64"
digest: "sha512:8f43ae1aa14ee07a2d9eb18f417388c47049d356da1faaeaa21baedb9f8c259d2262491fbb578805d745ca738472550ca7776c672a6004795873f6c2777f173e"
mounts:
- location: "~"
@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:
This is a test
@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
@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:

#!/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