Skip to content

Instantly share code, notes, and snippets.

@pbruna
pbruna / jwt.html
Created August 10, 2023 14:38
JWT for OnlyOffice
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/Javascript">
  • Bunny Hops: 30 seconds
  • Jumping Jacks: 30 seconds
  • Cherry Pickers: 30 seconds
  • Lunge to Twist: 30 seconds - alternate sides
  • Skater Plyos: 60 seconds - alternate sides
  • Air Squats: 60 seconds
  • Rest Period: 30 seconds
  • Alternating Supermans: 60 seconds - alternate arms and legs
  • Lateral Pushups: 60 seconds - alternate sides
  • Rest Period: 30 seconds
@pbruna
pbruna / FuckZimbraSignature.html
Last active January 31, 2017 17:52
Problema de tamaño de Zimbra
<!-- Este es el original enviado por CVega -->
<div style="color: #000000;
font-family: arial, helvetica, sans-serif;
font-size: 16px; font-style: normal; font-variant-ligatures: normal;
font-variant-caps: normal; font-weight: normal; letter-spacing: normal;
orphans: 2; text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: #ffffff;
word-wrap: break-word;">
<div>
@pbruna
pbruna / Vagrantfile.rb
Created December 2, 2016 15:04
Vagrantfile for Zimbra
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "bento/centos-7.2"
config.ssh.insert_key = false
# Compartir directorio de desarollo de Zimlets
var exec = require('child_process').exec;
var hash = {
'A': {els: [1,2], result: 0},
'B': {els: [1,2,3,4,5], result: 0},
'C': {els: [1,2,3,4,5], result: 0},
'D': {els: [1,4,5], result: 0},
}
var COMANDOS = [
@pbruna
pbruna / build.log
Created July 13, 2016 13:14
log build openshift
The value of ALLOWED_UIDS is [1-]
The value of DROP_CAPS is [KILL,MKNOD,SETGID,SETUID,SYS_CHROOT]
Using locally available image "ryanj/centos7-s2i-nodejs@sha256:dba7648405d14ff152e63c69b609f11900dab046194c168dd2194ff11418bd34"
Creating a new S2I builder with build config: "Builder Name:\t\t\tNode.js v6.2.2\nBuilder Image:\t\t\tryanj/centos7-s2i-nodejs@sha256:dba7648405d14ff152e63c69b609f11900dab046194c168dd2194ff11418bd34\nSource:\t\t\t\tfile:///tmp/s2i-build261500343/upload/src#109c53b8ad5fe7f012594f9e0ca91fd38fe68bc4\nOutput Image Tag:\t\tpassword-reset/parse-45:62f4a161\nEnvironment:\t\t\tOPENSHIFT_BUILD_NAME=parse-45,OPENSHIFT_BUILD_NAMESPACE=password-reset,OPENSHIFT_BUILD_SOURCE=git@github.com:ZBoxApp/zbox-password-recovery.git,OPENSHIFT_BUILD_REFERENCE=feature/react-components,OPENSHIFT_BUILD_COMMIT=109c53b8ad5fe7f012594f9e0ca91fd38fe68bc4,PORT=8080,HOSTNAME=reset.zboxapp.com,MAILER_SMTP=mta-in.zboxapp.com,MAILER_PORT=587,MAILER_USERNAME=manager@zboxapp.com,MAILER_PASSWORD=Zb0x.,2016..,MAILER_SSL=0,ZIM
{
"rrsets":[
{
"name":"multiple.tempdomain.com",
"type":"A",
"changetype":"REPLACE",
"records":[
{
"content":"192.0.5.44",
"disabled":false,
@pbruna
pbruna / oauth_zimbra_example.rb
Created October 8, 2015 22:59
oauth_zimbra_example.rb
pbruna@pbrunamac ~ $ pry
[1] pry(main)>
[1] pry(main)> require 'oauth' => true
[2] pry(main)> @consumer=OAuth::Consumer.new( "esta_es_la_key","este_es_el_secret", { site: 'https://mail.zboxtest.com', request_token_path: '/service/extension/sampleoauth/req_token', authorize_path: '/service/extension/sampleoauth/authorization', access_token_path: '/service/extension/sampleoauth/access_token'})
=> #<OAuth::Consumer:0x007fc592b1e5e0
@key="esta_es_la_key",
@options=
{:signature_method=>"HMAC-SHA1",
@pbruna
pbruna / mruby_nginx_mail_auth_router.rb
Last active April 4, 2018 12:45
A mruby-nginx example of how to do an Auth Router for a Mail Proxy
backend = ""
request = Nginx::Request.new
auth_user = request.headers_in["Auth-User"]
domain = auth_user.split(/@/).last
backend_zimbra_open = "http://opmailbox1:7072/service/extension/nginx-lookup"
backend_zimbra_network = "http://nemailbox1:7072/service/extension/nginx-lookup"
auth_headers = {
"Auth-User" => request.headers_in["Auth-User"],
@pbruna
pbruna / saslauthd.conf
Last active November 24, 2023 16:18
openLDAP Proxy with Meta Backend
# /etc/saslauthd.conf
ldap_servers: ldap://127.0.0.1
ldap_search_base: ou=%d,dc=local
ldap_timeout: 10
ldap_filter: (|(uid=%U)(SAMACCOUNTNAME=%U))
ldap_bind_dn: cn=Manager,dc=local
ldap_password: secret
ldap_deref: never
ldap_restart: yes
ldap_scope: sub