Skip to content

Instantly share code, notes, and snippets.


  • Barcelona, Spain
Block or report user

Report or block alexpdp7

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:00ce6015a6ed3da279ab4efe7f4eb30f
Pero no del todo. Lo más curioso es que entre mi portátil anterior con Linux y luego con Windows, y el MacBook Pro con OS X, la combinación que me permitía estar más alejado de una toma de corriente era en Linux, y la que menos, el OS X. Probablemente se deba a una combinación de factores no muy naturales (usar Mate en Linux, un entorno de escritorio de otra época; tener que usar una máquina virtual para usar Docker en OS X y puede que la batería del MacBook esté más degradada), pero sigue siendo algo que influye a mi reseña.
Vertical scaling is another good option which is applicable in many cases. You can probably start off with a smaller database server than what is available. This will help you save costs at the beginning, when you probably have less data to deal with. Data growth often is correlated to business growth, so buying a bigger server later on might be easier to do. In any case, it pays to perform some back of the envelope estimates early in the project to have a good idea of whether vertical
alexpdp7 / client.pp
Created Dec 1, 2018
Installing FreeIPA on Debian
View client.pp
class freeipa::client {
if ($osfamily == 'Debian') {
$package_names = ['freeipa-client_4.4.4-4_amd64.deb', 'freeipa-common_4.4.4-4_all.deb', 'python-ipaclient_4.4.4-4_all.deb', 'python-ipalib_4.4.4-4_all.deb', 'freeipa-admintools_4.4.4-4_all.deb']
$download_urls = $ |$package_name| { "${package_name}" }
$download_urls_spaces = join($download_urls, ' ')
$package_names_spaces = join($package_names, ' ')
package {['sudo', 'bind9utils', 'certmonger', 'curl', 'krb5-user', 'libcurl3', 'libnss3-tools', 'libnss-sss', 'libpam-sss', 'libsasl2-modules-gssapi-mit', 'libsss-sudo', 'libxmlrpc-core-c3', 'oddjob-mkhomedir', 'python-dnspython', 'python-gssapi', 'python-ldap', 'sssd', 'libbasicobjects0', 'libcollection4', 'libcurl3-nss', 'libini-config5', 'libref-array1', 'gnupg2', 'python-cffi', 'python-cryptography', 'python-custodia', 'python-dbus', 'python-jwcrypto', 'python-libipa-hbac', 'python-lxml',
View _var_log_pki_pki-tomcat_localhost.2018-11-07.log
SEVERE: Servlet.service() for servlet [caUpdateNumberRange] in context with path [/ca] threw exception [Could not initialize class$TLSContext] with root cause
java.lang.NoClassDefFoundError: Could not initialize class$TLSContext
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at org.apache.http.conn.ssl.SSLSocketFactory.getSocketFactory(
alexpdp7 / _var_log_pki_pki-tomcat_ca_debug
Created Nov 5, 2018
ipa-replica-install -U --setup-ca -N problems
View _var_log_pki_pki-tomcat_ca_debug
[05/Nov/2018:20:30:24][http-bio-8443-exec-3]: === Subsystem Configuration ===
[05/Nov/2018:20:30:24][http-bio-8443-exec-3]: SystemConfigService: validate clone URI:
[05/Nov/2018:20:30:24][http-bio-8443-exec-3]: SystemConfigService: import certificate chain from master
[05/Nov/2018:20:30:24][http-bio-8443-exec-3]: ConfigurationUtils: Searching for SecureAdminPort in CA hosts
[05/Nov/2018:20:30:24][http-bio-8443-exec-3]: ConfigurationUtils: host:
[05/Nov/2018:20:30:24][http-bio-8443-exec-3]: ConfigurationUtils: SecurePort port: 443
[05/Nov/2018:20:30:24][http-bio-8443-exec-3]: ConfigurationUtils: SecureAdminPort port found: 443
[05/Nov/2018:20:30:24][http-bio-8443-exec-3]: ConfigurationUtils.importCertChain()
[05/Nov/2018:20:30:24][http-bio-8443-exec-3]: ConfigurationUtils: GET
[05/Nov/2018:20:30:24][http-bio-8443-exec-3]: ConfigurationUtils: certificate chain:
import collections
def calculator(sides, rolls, min_bonus, max_bonus, max_difficulty):
distribution = collections.Counter([x + y + z for x in range(1, sides + 1) for y in range(1, sides + 1) for z in range(1, sides + 1)])
def is_win(r1, r2, bonus):
if r1 == sides * rolls:
return r2 != sides * rolls
if r1 == rolls:
View update_ddns_lambda
import json
import boto3
# To use, connect to an API gateway, grant route53 permissions and:
# curl "https://your_api_gateway_host/prod/updateDdns?host_name=host_name_to_update&secret=matching_secret"
# or
View foo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
alexpdp7 /
Created Jan 24, 2016
Java Lambda Exceptions wrapper
import java.nio.file.Files;
import java.util.Arrays;
import java.util.function.Function;
public class LambaExceptionsSample {
public interface ErrableFunction<T, V, E extends Exception> {
public V apply(T t) throws E;
You can’t perform that action at this time.