Skip to content

Instantly share code, notes, and snippets.

View Pierozi's full-sized avatar

Pierre Tomasina Pierozi

View GitHub Profile
@Pierozi
Pierozi / s3upload.service.ts
Created July 13, 2022 15:37
Angular S3 Upload Multipart
import {Injectable} from '@angular/core'
import {Observable} from 'rxjs'
import {HttpClient, HttpHeaders} from '@angular/common/http'
import {AuthService} from '../auth/auth.service'
export interface PresignResponse {
url: string
fields?: PresignFields
}
@Pierozi
Pierozi / aws-jks.sh
Created May 31, 2022 14:27
Bundle AWS Certificate to JKS
#!/usr/bin/env bash
#
# Download bundle certificates to import it in JKS
#
# source: AWS Documentation
# https://docs.aws.amazon.com/documentdb/latest/developerguide/connect_programmatically.html#connect_programmatically-tls_enabled
mydir=/tmp/certs
truststore=${mydir}/rds-truststore.jks
storepassword=<CHANGE-ME>
@Pierozi
Pierozi / phpmodules.sh
Created November 6, 2019 08:50
ContinuousPHP runtime php modules
#!/bin/bash
echo "Updating apt"
apt-get update -y
echo "Installing libraries"
apt-get install -y libpspell-dev librabbitmq-dev libbz2-dev libenchant-dev libwebp-dev libjpeg-dev libpng-dev libz-dev \
libgmp-dev libc-client-dev libkrb5-dev libicu-dev libldap2-dev libmemcached-dev libpq-dev \
librecode-dev libxml2-dev libtidy-dev libxslt-dev
@Pierozi
Pierozi / dialer.js
Created August 22, 2019 18:42
LibP2P Dialer Circuit Relay
'use strict'
/* eslint-disable no-console */
const relayId = "QmemquW1rBrxZ4nq1KvNSKgHiRqKhXQdcW4ZvWSMftVAuy"
const relayPort = "54783"
const Node = require('./node-circuit')
const PeerInfo = require('peer-info')
const PeerBook = require('peer-book')
const PeerId = require('peer-id')
@Pierozi
Pierozi / listener.js
Created August 22, 2019 18:34
LibP2P Listener Circuit Relay
'use strict'
/* eslint-disable no-console */
const relayId = "QmemquW1rBrxZ4nq1KvNSKgHiRqKhXQdcW4ZvWSMftVAuy"
const relayPort = "54783"
const Node = require('./node-circuit')
const PeerInfo = require('peer-info')
const PeerBook = require('peer-book')
const PeerId = require('peer-id')
@Pierozi
Pierozi / node-circuit.js
Created August 22, 2019 18:33
LibP2P Node with circuit
'use strict'
/* eslint-disable no-console */
const Libp2p = require('libp2p')
const TCP = require('libp2p-tcp')
const Circuit = require('libp2p-circuit')
const SPDY = require('libp2p-spdy')
const SECIO = require('libp2p-secio')
const MulticastDNS = require('libp2p-mdns')
const DHT = require('libp2p-kad-dht')

Keybase proof

I hereby claim:

  • I am pierozi on github.
  • I am pierozi (https://keybase.io/pierozi) on keybase.
  • I have a public key ASDkOQe8IV8MxyPM1Mm1rHLy_AeWQ5TroUCMpS3QNpfVDQo

To claim this, I am signing this object:

@Pierozi
Pierozi / gitlab-register.sh
Created May 10, 2019 09:16
Gitlab Runner Register
#!/bin/bash
service=$1
token=$2
name=$3
docker-compose run --rm $service register -n \
--url https://gitlab.com/ \
--registration-token $token \
--executor docker \
@Pierozi
Pierozi / .gitlab-ci.yml
Created April 10, 2019 06:28
Gitlab CI Wortimmo
stages:
- package
- test
- deploy
package:test:
stage: package
image: wortimmo/php:7.2-xdebug
before_script:
# install ssh-agent
# Encoding: utf-8
# frozen_string_literal: true
#
# Cookbook Name:: codedeploy-agent
# Recipe:: default
#
# Copyright 2018, continuous.lu
# Author: Tomasina Pierre ([email protected])
#