Skip to content

Instantly share code, notes, and snippets.

View rezen's full-sized avatar

Andres Hermosilla rezen

View GitHub Profile
@rezen
rezen / aws_actions.txt
Last active June 16, 2023 10:55
It's nice having a list of AWS IAM actions
account:DisableRegion
account:EnableRegion
account:ListRegions
activate:CreateForm
activate:GetAccountContact
activate:GetContentInfo
activate:GetCosts
activate:GetCredits
activate:GetMemberInfo
activate:GetProgram
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = new OpenAPI\Client\Configuration;
$config->setHost('http://localhost/v1.40');
$apiInstance = new OpenAPI\Client\Api\ContainerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client([
@rezen
rezen / README.md
Created July 31, 2018 20:36
Serverless lambda hack for python

The serverless-offline module handles node.js modules, but sls invoke will handle modules for python. So just create a node.js module with the same name as the python module, and a method with the same same which calls sls invoke ... and wallah!

'use strict';
/**
* https://github.com/SalesforceEng/secure-filters
*
* @description
* Frequently strings are dirty and need to
* have some HTML removed. Often times you may
* want to control the filtering a bit more, for
* example removing all elements except anchors.
#!/usr/bin/env bash
set -e
format_text=1
if [[ "$@" == *"--nofmt"* ]]; then
format_text=0
fi
image="$1"
@rezen
rezen / m2crypto-certificates.py
Created April 5, 2017 18:50 — forked from eskil/m2crypto-certificates.py
Example of generating CA certs and CA signed certs using python m2crypto.
"""
Tools for creating a CA cert and signed server certs.
Divined from http://svn.osafoundation.org/m2crypto/trunk/tests/test_x509.py
The mk_temporary_xxx calls return a NamedTemporaryFile with certs.
Usage ;
# Create a temporary CA cert and it's private key
cacert, cakey = mk_temporary_cacert()
#!/usr/bin/env bash
# @author Andres Hermosilla
# @notes
# Jenkins ssl
# http://balodeamit.blogspot.com/2014/03/jenkins-switch-to-ssl-https-mode.html
# https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-with-ssl-as-a-reverse-proxy-for-jenkins
# @todo
# - Setup security with LDAP
# - Add optional systems such as selenium

Keybase proof

I hereby claim:

  • I am rezen on github.
  • I am rezen (https://keybase.io/rezen) on keybase.
  • I have a public key whose fingerprint is C4C1 2B93 6D91 CD53 5DEB D31B C2E6 DEA0 5DA0 698A

To claim this, I am signing this object:

:: Make sure to download and install dotnet45+ before running the script!
:: Install Chocolatey!
:: @todo Add http://babun.github.io/
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
:: Browsers
choco install -y firefox
choco install -y googlechrome
choco install -y ie11