Skip to content

Instantly share code, notes, and snippets.

Avatar

Andres Hermosilla rezen

View GitHub Profile
@rezen
rezen / aws_actions.txt
Last active Jul 28, 2022
It's nice having a list of AWS IAM actions
View aws_actions.txt
account:DisableRegion
account:EnableRegion
account:ListRegions
activate:CreateForm
activate:GetAccountContact
activate:GetContentInfo
activate:GetCosts
activate:GetCredits
activate:GetMemberInfo
activate:GetProgram
View sample.php
<?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 Jul 31, 2018
Serverless lambda hack for python
View README.md

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!

View trimmer.js
'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.
View dockerfileview.sh
#!/usr/bin/env bash
set -e
format_text=1
if [[ "$@" == *"--nofmt"* ]]; then
format_text=0
fi
image="$1"
@rezen
rezen / m2crypto-certificates.py
Created Apr 5, 2017 — forked from eskil/m2crypto-certificates.py
Example of generating CA certs and CA signed certs using python m2crypto.
View m2crypto-certificates.py
"""
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()
View setup_jenkins.sh
#!/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
View keybase.md

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:

View setup_window.bat
:: 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